diff --git a/deployments/deployments.json b/deployments/deployments.json index 904ea1b..4bb581c 100644 --- a/deployments/deployments.json +++ b/deployments/deployments.json @@ -19331,6 +19331,2154 @@ } } ], + "59144": [ + { + "name": "linea", + "chainId": "59144", + "contracts": { + "EnsoBeacon": { + "address": "0x277D98D33b7F44921d4230697DeF8d1D56aBAa62", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "coreImplementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "fallbackImplementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "FactorySet", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDelay", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoTimelock", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "Wait", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdministrationTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdministrationTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "CoreUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "Delay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousDelegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "DelegationTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousDelegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "DelegationTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyUpgrade", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "FallbackUpgraded", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNSET_TIMESTAMP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNSET_VALUE", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownable", + "type": "address" + } + ], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "coreImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fallbackImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeCore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeFallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDelegate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newFactory", + "type": "address" + } + ], + "name": "setFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timelockData", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "value", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "transferAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "transferDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownable", + "type": "address" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "address", + "name": "factoryImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "factoryUpgradeData", + "type": "bytes" + } + ], + "name": "upgradeCore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeFallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "EnsoWallet": { + "address": "0xb6Bc9B50b4AC1397AB03d8a24d8fa529a5070ff0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "command_index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "ExecutionFailed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArrayLength", + "type": "error" + }, + { + "inputs": [], + "name": "NoDelegateCalls", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "UnsafeSetting", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ExecutionFromModuleFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ExecutionFromModuleSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "permission", + "type": "bool" + } + ], + "name": "PermissionSet", + "type": "event" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MODULE_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OWNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum IModuleManager.Operation", + "name": "operation", + "type": "uint8" + } + ], + "name": "execTransactionFromModule", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum IModuleManager.Operation", + "name": "operation", + "type": "uint8" + } + ], + "name": "execTransactionFromModuleReturnData", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "executeShortcut", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "internalType": "struct MinimalWallet.ApprovalNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "revokeApprovals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC1155Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "erc20", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC20Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC721Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bool", + "name": "permission", + "type": "bool" + } + ], + "name": "setPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct MinimalWallet.TransferNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC1155s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20[]", + "name": "erc20s", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC20s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "withdrawERC721s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "EnsoWalletFactory": { + "address": "0x66fc62c1748E45435b06cF8dD105B73E9855F93E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "ensoBeacon_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "NoLabel", + "type": "error" + }, + { + "inputs": [], + "name": "NotOwner", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "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": false, + "internalType": "contract IEnsoWallet", + "name": "instance", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "deployer", + "type": "address" + } + ], + "name": "Deployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "contract IEnsoWallet", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "deployCustom", + "outputs": [ + { + "internalType": "contract IEnsoWallet", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ensoBeacon", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "getCustomAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "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" + } + ] + }, + "FactoryDeployer": { + "address": "0xc3a77152e7C91109438fEc3962E778E2123Cb26e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "factoryImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] + }, + "MinimalWallet": { + "address": "0xb8D76a79B60449deda533B9eeE68a1efcCc9a04C", + "abi": [ + { + "inputs": [], + "name": "InvalidArrayLength", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawFailed", + "type": "error" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MODULE_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OWNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "internalType": "struct MinimalWallet.ApprovalNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "revokeApprovals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC1155Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "erc20", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC20Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC721Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct MinimalWallet.TransferNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC1155s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20[]", + "name": "erc20s", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC20s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "withdrawERC721s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + } + } + } + ], "1313161554": [ { "name": "aurora", diff --git a/deployments/linea/.chainId b/deployments/linea/.chainId new file mode 100644 index 0000000..c9e6af4 --- /dev/null +++ b/deployments/linea/.chainId @@ -0,0 +1 @@ +59144 \ No newline at end of file diff --git a/deployments/linea/EnsoBeacon.json b/deployments/linea/EnsoBeacon.json new file mode 100644 index 0000000..d424999 --- /dev/null +++ b/deployments/linea/EnsoBeacon.json @@ -0,0 +1,749 @@ +{ + "address": "0x277D98D33b7F44921d4230697DeF8d1D56aBAa62", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "coreImplementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "fallbackImplementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "FactorySet", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDelay", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NoTimelock", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "Wait", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdministrationTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdministrationTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "CoreUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "Delay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousDelegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "DelegationTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousDelegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "DelegationTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyUpgrade", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalized", + "type": "bool" + } + ], + "name": "FallbackUpgraded", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNSET_TIMESTAMP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNSET_VALUE", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownable", + "type": "address" + } + ], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "coreImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fallbackImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeCore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeFallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDelegate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newFactory", + "type": "address" + } + ], + "name": "setFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timelockData", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "value", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "transferAdministration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDelegate", + "type": "address" + } + ], + "name": "transferDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownable", + "type": "address" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "address", + "name": "factoryImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "factoryUpgradeData", + "type": "bytes" + } + ], + "name": "upgradeCore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeFallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x97dab653e064441e6c7f74996c4ac331b96ead67995ce8a703cb5fb3fce4971b", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x826e0BB2276271eFdF2a500597f37b94f6c153bA", + "contractAddress": null, + "transactionIndex": 5, + "gasUsed": "2319405", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x83680d56b3969b5316b4fe4a623fc336eadc2196dfcb1f01f2ad1064a38f69ce", + "transactionHash": "0x97dab653e064441e6c7f74996c4ac331b96ead67995ce8a703cb5fb3fce4971b", + "logs": [], + "blockNumber": 1195803, + "cumulativeGasUsed": "2424405", + "status": 1, + "byzantium": true + }, + "args": [ + "0xfae0bbFD75307865Dcdf21d9deFEFEDEee718431", + "0xb6Bc9B50b4AC1397AB03d8a24d8fa529a5070ff0", + "0xb8D76a79B60449deda533B9eeE68a1efcCc9a04C" + ], + "numDeployments": 1, + "solcInputHash": "6e9a09176756a7e15ef5f84545755d11", + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coreImplementation_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fallbackImplementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FactorySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDelay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoTimelock\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Wait\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdministrationTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdministrationTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"finalized\",\"type\":\"bool\"}],\"name\":\"CoreUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"finalized\",\"type\":\"bool\"}],\"name\":\"Delay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousDelegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newDelegate\",\"type\":\"address\"}],\"name\":\"DelegationTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousDelegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newDelegate\",\"type\":\"address\"}],\"name\":\"DelegationTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyUpgrade\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"finalized\",\"type\":\"bool\"}],\"name\":\"FallbackUpgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNSET_TIMESTAMP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNSET_VALUE\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdministration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownable\",\"type\":\"address\"}],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coreImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delegate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeFallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingDelegate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceAdministration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timelockData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferAdministration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newDelegate\",\"type\":\"address\"}],\"name\":\"transferDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownable\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"updateDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factoryImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"factoryUpgradeData\",\"type\":\"bytes\"}],\"name\":\"upgradeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeFallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/EnsoBeacon.sol\":\"EnsoBeacon\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/EnsoBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nimport \\\"./interfaces/IBeacon.sol\\\";\\nimport \\\"./interfaces/IOwnable.sol\\\";\\nimport \\\"./interfaces/IUUPS.sol\\\";\\nimport \\\"./access/Timelock.sol\\\";\\n\\ncontract EnsoBeacon is IBeacon, Timelock {\\n\\n uint256 constant public MAX_DELAY = 2419200; // 4 weeks\\n\\n address public admin;\\n address public delegate;\\n address public factory;\\n address public coreImplementation;\\n address public fallbackImplementation;\\n\\n address public pendingAdmin;\\n address public pendingDelegate;\\n\\n event CoreUpgraded(address previousImplementation, address newImplementation, bool finalized);\\n event FallbackUpgraded(address previousImplementation, address newImplementation, bool finalized);\\n event EmergencyUpgrade();\\n event AdministrationTransferred(address previousAdmin, address newAdmin);\\n event AdministrationTransferStarted(address previousAdmin, address newAdmin);\\n event DelegationTransferred(address previousDelegate, address newDelegate);\\n event DelegationTransferStarted(address previousDelegate, address newDelegate);\\n event Delay(uint256 newDelay, bool finalized);\\n\\n error InvalidImplementation();\\n error InvalidAccount();\\n error InvalidDelay();\\n error NotPermitted();\\n error FactorySet();\\n\\n modifier onlyAdmin() {\\n if (msg.sender != admin) revert NotPermitted();\\n _;\\n }\\n\\n modifier onlyDelegate() {\\n if (msg.sender != delegate) revert NotPermitted();\\n _;\\n }\\n\\n constructor(address admin_, address coreImplementation_, address fallbackImplementation_) {\\n admin = admin_;\\n delegate = admin_;\\n coreImplementation = coreImplementation_;\\n fallbackImplementation = fallbackImplementation_;\\n }\\n\\n // @notice The current core implementation\\n // @dev Called by proxy contracts to get the implementation address\\n function implementation() external view override returns (address) {\\n return coreImplementation;\\n }\\n\\n // @notice Switch from the core implementation to the fallback implementation\\n function emergencyUpgrade() external onlyDelegate {\\n _upgradeCore(fallbackImplementation);\\n emit EmergencyUpgrade();\\n }\\n\\n // @notice Initialize an upgrade to a new core implementation\\n // @param newImplementation The address of the new core implementation\\n // @param factoryImplementation Optionally include a new factory implementation to upgrade the factory simultaneously. Pass zero address if no upgrade is needed\\n // @param factoryUpgradeData Calldata for upgrading the new factory. Pass zero bytes if factory is not being upgraded or no additional call needs to be made\\n function upgradeCore(\\n address newImplementation,\\n address factoryImplementation,\\n bytes memory factoryUpgradeData\\n ) external onlyAdmin {\\n address currentImplementation = coreImplementation;\\n if (newImplementation == address(0)) revert InvalidImplementation();\\n if (newImplementation == currentImplementation) revert InvalidImplementation();\\n bytes32 key = this.upgradeCore.selector;\\n bytes memory data = abi.encode(newImplementation, factoryImplementation, factoryUpgradeData);\\n _startTimelock(key, data);\\n emit CoreUpgraded(currentImplementation, newImplementation, false);\\n }\\n\\n // @notice Finalize the new core implementation\\n function finalizeCore() external {\\n // Resolve timelock\\n bytes32 key = this.upgradeCore.selector;\\n (address newImplementation, address factoryImplementation, bytes memory factoryUpgradeData) = abi.decode(\\n _resolveTimelock(key), (address, address, bytes)\\n );\\n // Upgrade\\n _upgradeCore(newImplementation);\\n if (factoryImplementation != address(0)) _upgradeFactory(factoryImplementation, factoryUpgradeData);\\n }\\n\\n // @notice Initialize an upgrade to a new fallback implementation\\n // @param newImplementation The address of the new fallback implementation\\n function upgradeFallback(address newImplementation) external onlyAdmin {\\n address currentImplementation = fallbackImplementation;\\n if (newImplementation == address(0)) revert InvalidImplementation();\\n if (newImplementation == currentImplementation) revert InvalidImplementation();\\n bytes32 key = this.upgradeFallback.selector;\\n bytes memory data = abi.encode(newImplementation);\\n _startTimelock(key, data);\\n emit FallbackUpgraded(currentImplementation, newImplementation, false);\\n }\\n\\n // @notice Finalize the new fallback implementation\\n function finalizeFallback() external {\\n // Resolve timelock\\n bytes32 key = this.upgradeFallback.selector;\\n (address newImplementation) = abi.decode(\\n _resolveTimelock(key), (address)\\n );\\n // Upgrade\\n if (newImplementation == address(0)) revert InvalidImplementation(); // sanity check\\n address previousImplementation = fallbackImplementation;\\n fallbackImplementation = newImplementation;\\n emit FallbackUpgraded(previousImplementation, newImplementation, true);\\n }\\n\\n // @notice Upgrade the factory implementation\\n // @param newImplementation The address of the new factory implementation\\n // @param data Calldata for upgrading the new factory. Pass zero bytes if no additional call needs to be made\\n function upgradeFactory(address newImplementation, bytes memory data) external onlyAdmin {\\n if (newImplementation == address(0)) revert InvalidImplementation();\\n _upgradeFactory(newImplementation, data);\\n }\\n\\n // @notice Initiate transfer of the admin role\\n // @notice newAdmin The address of the new admin\\n function transferAdministration(address newAdmin) external onlyAdmin {\\n if (newAdmin == address(0)) revert InvalidAccount();\\n if (newAdmin == admin) revert InvalidAccount();\\n pendingAdmin = newAdmin;\\n emit AdministrationTransferStarted(admin, newAdmin);\\n }\\n\\n // @notice Accept new admin role\\n // @dev Only the pending admin can call this function\\n function acceptAdministration() external {\\n if (msg.sender != pendingAdmin) revert NotPermitted();\\n delete pendingAdmin;\\n address previousAdmin = admin;\\n admin = msg.sender;\\n emit AdministrationTransferred(previousAdmin, msg.sender);\\n }\\n\\n // @notice Renounce admin role. No upgrades can be done if this function is called.\\n // @dev This function renounces both the admin and the delegate roles.\\n function renounceAdministration() external onlyAdmin {\\n address previousAdmin = admin;\\n address previousDelegate = delegate;\\n delete admin;\\n delete delegate;\\n delete pendingAdmin;\\n delete pendingDelegate;\\n emit AdministrationTransferred(previousAdmin, address(0));\\n emit DelegationTransferred(previousDelegate, address(0));\\n }\\n\\n // @notice Initiate transfer of the delegate role\\n // @notice newDelegate The address of the new delegate\\n function transferDelegation(address newDelegate) external onlyAdmin {\\n if (newDelegate == address(0)) revert InvalidAccount();\\n if (newDelegate == delegate) revert InvalidAccount();\\n pendingDelegate = newDelegate;\\n emit DelegationTransferStarted(delegate, newDelegate);\\n }\\n\\n // @notice Accept new delegate role\\n // @dev Only the pending delegate can call this function\\n function acceptDelegation() external {\\n if (msg.sender != pendingDelegate) revert NotPermitted();\\n delete pendingDelegate;\\n address previousDelegate = delegate;\\n delegate = msg.sender;\\n emit DelegationTransferred(previousDelegate, msg.sender);\\n }\\n\\n // @notice Renounce delegate role. Emergency upgrades cannot happen while this role remain unfilled.\\n // @dev The admin can always give this role to another address with the transferDelegation function\\n function renounceDelegation() external onlyDelegate {\\n address previousDelegate = delegate;\\n delete delegate;\\n emit DelegationTransferred(previousDelegate, address(0));\\n }\\n\\n // @notice Transfer ownership of a contract that is owned by this contract\\n // @param ownable The address of the contract that is getting it's ownership transferred\\n // @param newOwner The address of the new owner\\n function transferOwnership(address ownable, address newOwner) external onlyAdmin {\\n IOwnable(ownable).transferOwnership(newOwner);\\n }\\n\\n // @notice Accept ownership of another contract by this contract\\n // @param ownable The address of the contract that is getting it's ownership transferred\\n function acceptOwnership(address ownable) external onlyAdmin {\\n IOwnable(ownable).acceptOwnership();\\n }\\n\\n // @notice Set the factory address. Once set, the factory cannot be changed\\n // @param newFactory The address of the new factory\\n function setFactory(address newFactory) external onlyAdmin {\\n if (factory != address(0)) revert FactorySet();\\n if (newFactory == address(0)) revert InvalidAccount();\\n factory = newFactory;\\n }\\n\\n // @notice Initiate an update of the delay value\\n // @param newDelay The new delay in seconds\\n function updateDelay(uint256 newDelay) external onlyAdmin {\\n if (newDelay > MAX_DELAY) revert InvalidDelay();\\n // Set timelock\\n bytes32 key = this.updateDelay.selector;\\n bytes memory data = abi.encode(newDelay);\\n _startTimelock(key, data);\\n emit Delay(newDelay, false);\\n }\\n\\n // @notice Finalize the delay in state\\n function finalizeDelay() external {\\n // Resolve timelock\\n bytes32 key = this.updateDelay.selector;\\n (uint256 newDelay) = abi.decode(\\n _resolveTimelock(key), (uint256)\\n );\\n if (newDelay > MAX_DELAY) revert InvalidDelay(); // sanity check\\n // Set delay\\n delay = newDelay;\\n emit Delay(newDelay, true);\\n }\\n\\n // @notice Internal function for setting the new core implementation\\n // @param newImplementation The address of the new implementation\\n function _upgradeCore(address newImplementation) internal {\\n if (newImplementation == address(0)) revert InvalidImplementation();\\n //if (newImplementation == coreImplementation) revert InvalidImplementation();\\n address previousImplementation = coreImplementation;\\n coreImplementation = newImplementation;\\n emit CoreUpgraded(previousImplementation, newImplementation, true);\\n }\\n\\n // @notice Internal function for upgrading the factory implementation\\n // @param newImplementation The address of the new factory implementation\\n // @param data Calldata for upgrading the new factory. Pass zero bytes if no additional call needs to be made\\n function _upgradeFactory(address newImplementation, bytes memory data) internal {\\n if (data.length > 0) {\\n IUUPS(factory).upgradeToAndCall(newImplementation, data);\\n } else {\\n IUUPS(factory).upgradeTo(newImplementation);\\n }\\n }\\n\\n // @notice Internal function to check timelock and reset it after timelock has matured\\n // @param key The bytes32 key that represents the function that is timelocked\\n // @return The bytes data that is stored by the timelock\\n function _resolveTimelock(bytes32 key) internal returns (bytes memory data) {\\n _checkTimelock(key);\\n data = _getTimelockValue(key);\\n _resetTimelock(key);\\n }\\n}\\n\",\"keccak256\":\"0x8d338715ebfa384b7c1e8a5a7c0ec39f142bb925ffe7430218e6362043c18b0c\",\"license\":\"GPL-3.0-only\"},\"contracts/access/Timelock.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\n\\nabstract contract Timelock {\\n\\n uint256 constant public UNSET_TIMESTAMP = 1;\\n bytes constant public UNSET_VALUE = new bytes(0x01); \\n\\n uint256 public delay;\\n mapping(bytes32 => TimelockData) public timelockData;\\n\\n struct TimelockData {\\n uint256 timestamp;\\n bytes value;\\n }\\n \\n error NoTimelock();\\n error Wait();\\n\\n // @notice Internal function to initiate a timelock\\n // @param key The bytes32 key that represents the function that is timelocked\\n // @param value The bytes value that is stored until the timelock completes\\n function _startTimelock(bytes32 key, bytes memory value) internal {\\n TimelockData storage td = timelockData[key]; \\n td.timestamp = block.timestamp;\\n td.value = value;\\n }\\n\\n // @notice Internal function to check the current status of a timelock and revert if the timelock has not matured\\n // @param key The bytes32 key that represents the function that is timelocked\\n function _checkTimelock(bytes32 key) internal view {\\n TimelockData memory td = timelockData[key]; \\n if (td.timestamp < 2) revert NoTimelock();\\n if (block.timestamp < td.timestamp + delay) revert Wait();\\n }\\n\\n // @notice Internal function to view the value stored for a timelock\\n // @return The bytes value that is stored until the timelock completes\\n function _getTimelockValue(bytes32 key) internal view returns(bytes memory) {\\n return timelockData[key].value; \\n }\\n\\n // @notice Reset the timelock\\n // @param key The bytes32 key that represents the function that is timelocked\\n function _resetTimelock(bytes32 key) internal {\\n TimelockData storage td = timelockData[key];\\n // By not deleting TimelockData, we save gas on subsequent actions\\n td.timestamp = UNSET_TIMESTAMP; \\n td.value = UNSET_VALUE;\\n }\\n}\",\"keccak256\":\"0xa1943cf1181e99a2122b66410a7d07826f223fd3478a64e57cd96186a9a69391\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\ninterface IBeacon {\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xc072827b529b63c42f3421201f57e41f2d654f8298ca9d70a075d6ebdc9c7fdd\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.16;\\n\\ninterface IOwnable {\\n function transferOwnership(address newOwner) external;\\n\\n function acceptOwnership() external;\\n}\\n\",\"keccak256\":\"0x1f82db59fc133afb373887880ce0ade9e2c2b46ad56204c8d13d53c218bb0b9d\",\"license\":\"MIT\"},\"contracts/interfaces/IUUPS.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.16;\\n\\ninterface IUUPS {\\n function upgradeTo(address newImplementation) external;\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x4ba6a4d609bed25b7d9ca62cfda8f2c609d8939895560b72d8d69afc27af673d\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608034620000b557601f6200286438819003918201601f19168301916001600160401b03831184841017620000ba57808492606094604052833981010312620000b5576200004d81620000d0565b6200006960406200006160208501620000d0565b9301620000d0565b60018060a01b03808093169360018060a01b03199480866002541617600255856003541617600355168360055416176005551690600654161760065560405161277e9081620000e68239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000b55756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263230eae2f146121dd5750816324e0f57e1461212c57816326782247146120d957816333a861e01461207d578163402bbfb5146120165781634125ff9014611fda5781634859e38214611f8757816351710e4514611ece5781635bb4780814611deb5781635c60da1b1461112257816364d6235314611b045781636a42b8f814611ac95781636d435421146119ca5781637babfffc1461188f5781639068c51a146115b657816390c210bf146112e6578163913ee93d146111af57816392caa08b146111755781639d492a2c14611122578163addd34f514610e30578163c45a015514610ddb578163c780b63d14610c78578163c89e436114610c25578163d0ff6fc114610bd2578163d29a53df1461082e578163e03b874114610767578163e6d15e1b146103a1578163ea1466d3146102c9578163f0025d96146101c4575063f851a4401461016f57600080fd5b346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600254169051908152f35b5080fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576007549073ffffffffffffffffffffffffffffffffffffffff90818316330361029e57507fffffffffffffffffffffffff0000000000000000000000000000000000000000918216600755600280543393811684179091558351911673ffffffffffffffffffffffffffffffffffffffff16815260208101919091527ffd11f9fc2b7f18358a6f98ed3df762cdba9d98f2365d3021b5fd38d1240b0fad9080604081015b0390a151f35b83517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576008549073ffffffffffffffffffffffffffffffffffffffff90818316330361029e57507fffffffffffffffffffffffff0000000000000000000000000000000000000000918216600855600380543393811684179091558351911673ffffffffffffffffffffffffffffffffffffffff16815260208101919091527fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c7908060408101610298565b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577f90c210bf000000000000000000000000000000000000000000000000000000008060005260016020908082528460002061041c8287519261041284612317565b80548452016124ae565b83820152600281511061073f575160005481018091116107115742106106e957826000528082526104518186600020016124ae565b92600052808252846000208181558186519161046c83612317565b818352843681850137019181519167ffffffffffffffff968784116106bb5750610496845461245b565b601f8111610672575b508490601f84116001146105d1576000918491826105a6575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b81518201916060818385019403126105a257610506828201612573565b93610512868301612573565b91606081015191821161059a57019183603f8401121561059e578083015161053981612374565b9461054688519687612333565b81865287828601011161059a57610584938761056593870191016123f5565b73ffffffffffffffffffffffffffffffffffffffff8091169316612594565b8161058e57505051f35b61059791612643565b51f35b8780fd5b8680fd5b8580fd5b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104b8565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084939416918560005283876000209360005b898883831061065b5750505010610624575b505050811b0190556104e9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610617565b868601518855909601959485019487935001610605565b8460005285600020601f850160051c8101918786106106b1575b601f0160051c019083905b8281106106a557505061049f565b60008155018390610697565b909150819061068c565b6041907f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8385517f47e103ca000000000000000000000000000000000000000000000000000000008152fd5b6011857f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8486517f4f6c1185000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55760035473ffffffffffffffffffffffffffffffffffffffff81169182330361029e57507fffffffffffffffffffffffff000000000000000000000000000000000000000016600355815173ffffffffffffffffffffffffffffffffffffffff9091168152600060208201527fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c7908060408101610298565b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577faddd34f5000000000000000000000000000000000000000000000000000000009081600052600190602092828452846000206108a18487519261041284612317565b858201526002815110610baa57516000548101809111610b7c574210610b5457806000528284526108d68386600020016124ae565b9060005282845284600020838155838651916108f183612317565b818352863681850137019080519067ffffffffffffffff8211610b2657819061091a845461245b565b601f8111610ad3575b508790601f8311600114610a3657600092610a2b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82871b9260031b1c19161790555b83818051810103126105a257839061099973ffffffffffffffffffffffffffffffffffffffff95869201612573565b16918215610a045750600680547fffffffffffffffffffffffff000000000000000000000000000000000000000081168417909155855194168452830152818301527ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c90606090a151f35b85517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b015190503880610939565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08894169185600052896000209260005b8b828210610abd5750508411610a86575b505050811b01905561096a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610a79565b8385015186558b97909501949384019301610a68565b9091508360005287600020601f840160051c810191898510610b1c575b84939291601f8a920160051c01915b828110610b0d575050610923565b60008155859450899101610aff565b9091508190610af0565b6041857f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b5083517f47e103ca000000000000000000000000000000000000000000000000000000008152fd5b6011837f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8286517f4f6c1185000000000000000000000000000000000000000000000000000000008152fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600354169051908152f35b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55760025473ffffffffffffffffffffffffffffffffffffffff9182821690813303610db45750907ffd11f9fc2b7f18358a6f98ed3df762cdba9d98f2365d3021b5fd38d1240b0fad610d847fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c79493600354937fffffffffffffffffffffffff0000000000000000000000000000000000000000809116600255808516600355806007541660075560085416600855865191829182602060009193929373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0390a18351911673ffffffffffffffffffffffffffffffffffffffff168152600060208201528060408101610298565b84517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b828434610e2d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610e2d575073ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b80fd5b9050346102c557602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e57610e6b612289565b9173ffffffffffffffffffffffffffffffffffffffff806002541633036110f657806006541693169182156110cf578383146110cf578451908383830152828252610eb582612317565b7faddd34f50000000000000000000000000000000000000000000000000000000060005260018084528087600020428155019280519267ffffffffffffffff84116106bb5750610f05845461245b565b601f8111611086575b508490601f8411600114610fbe579183807ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c999795936060999795600093610f93575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b85519283528201528484820152a151f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff38610f51565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0849394169185600052866000209260005b8181106110715750917ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c99979593918560609a9896941061103a575b505050811b019055610f82565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061102d565b82840151855593860193928801928801610ff1565b8460005285600020601f850160051c8101918786106110c5575b601f0160051c019083905b8281106110b9575050610f0e565b600081550183906110ab565b90915081906110a0565b84517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8285517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600554169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020905160018152f35b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576111e8612289565b9073ffffffffffffffffffffffffffffffffffffffff908160025416918233036112be578316908115611297578282146112975750600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055825173ffffffffffffffffffffffffffffffffffffffff9182168152911660208201527fc84b53e36f9cc4d47cde3c091e2817c6da2d24e3acf415caa7162388440c41cd908060408101610298565b84517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b5083517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55761131f612289565b906113286122b1565b67ffffffffffffffff9160443583811161059e5761134990369083016123ae565b9273ffffffffffffffffffffffffffffffffffffffff938460025416330361158e57848060055416961694851561156657868614611566576113a688519283926020978989860152168a8401526060808401526080830190612418565b036113d77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe091828101845283612333565b7f90c210bf000000000000000000000000000000000000000000000000000000006000526001918286528289600020428155019481519485116106bb575061141f855461245b565b601f811161151d575b508591601f85116001146114ac57509183807f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b7071999795936060999795600093610f935750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c191617905585519283528201528484820152a151f35b849394929192169185600052866000209260005b8181106115085750917f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b707199979593918560609a9896941061103a57505050811b019055610f82565b828401518555938601939288019288016114c0565b8560005286600020601f860160051c81019188871061155c575b601f0160051c019084905b828110611550575050611428565b60008155018490611542565b9091508190611537565b8388517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8287517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577f64d623530000000000000000000000000000000000000000000000000000000080600052600190602090828252846000206116288487519261041284612317565b83820152600281511061073f575160005481018091116107115742106106e9578060005282825261165d8386600020016124ae565b90600052828252846000208381558386519161167883612317565b818352843681850137019080519067ffffffffffffffff82116118615781906116a1845461245b565b601f811161180e575b508590601f831160011461177157600092611766575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82871b9260031b1c19161790555b81818051810103126105a257810151926224ea00841161173f575082855583519283528201527fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f908290a151f35b84517f4fbe5dba000000000000000000000000000000000000000000000000000000008152fd5b0151905038806116c0565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08894169185600052876000209260005b898282106117f857505084116117c1575b505050811b0190556116f1565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880806117b4565b8385015186558b979095019493840193016117a3565b9091508360005285600020601f840160051c810191878510611857575b84939291601f8a920160051c01915b8281106118485750506116aa565b6000815585945089910161183a565b909150819061182b565b6041877f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576118c8612289565b9073ffffffffffffffffffffffffffffffffffffffff806002541633036119a25780831690811561197a5760035416918282146112975750600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055825173ffffffffffffffffffffffffffffffffffffffff9182168152911660208201527fb3efe8834d414d488190f39a997544d1e941aa3e5ebad80baa2abd82015482bf908060408101610298565b8285517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b5082517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557611a02612289565b611a0a6122b1565b9073ffffffffffffffffffffffffffffffffffffffff9081600254163303611aa15790808694939216803b15611a9d57849283602492885196879586947ff2fde38b00000000000000000000000000000000000000000000000000000000865216908401525af18015611a9057611a8057505051f35b611a89906122d4565b6101c05751f35b50505051903d90823e3d90fd5b8480fd5b8385517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602091549051908152f35b9050346102c5576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e5781359073ffffffffffffffffffffffffffffffffffffffff600254163303611dc3576224ea008211611d9b578351928282850152818452611b7684612317565b7f64d62353000000000000000000000000000000000000000000000000000000006000526001908183528186600020428155019185519167ffffffffffffffff83116106bb575091869493918893611bce835461245b565b601f8111611d3e575b508397601f8311600114611c7a57827fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f998192600093611c4f575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b8351928352820152a151f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff38611c12565b977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0839293169084600052856000209160005b818110611d23575099837fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f9b10611cec575b505050811b019055611c43565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080611cdf565b8b83015184558c9a508d985092850192918701918701611cad565b91939596509180945060005284600020601f840160051c810191868510611d91575b918a959391601f8b999896940160051c01905b818110611d805750611bd7565b600081558a98508b96508201611d73565b9091508190611d60565b8284517f4fbe5dba000000000000000000000000000000000000000000000000000000008152fd5b8284517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557611e24612289565b73ffffffffffffffffffffffffffffffffffffffff80600254163303611dc357825491818316611ea65716908115611e7e577fffffffffffffffffffffffff00000000000000000000000000000000000000001617905551f35b8284517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b8385517f5763f48e000000000000000000000000000000000000000000000000000000008152fd5b839150346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057611f08612289565b73ffffffffffffffffffffffffffffffffffffffff90816002541633036110f6571690813b156102c557829182918551809481937f79ba50970000000000000000000000000000000000000000000000000000000083525af18015611f7d57611f7057509051f35b611f79906122d4565b9051f35b83513d84823e3d90fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600854169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602090516224ea008152f35b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5579181923581526001602052206120796120646001835493016124ae565b83519384938452806020850152830190612418565b0390f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0578051612079916120bc82612317565b600182526020368184013751918291602083526020830190612418565b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b9050346102c557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557612164612289565b60243567ffffffffffffffff8111611a9d5761218390369084016123ae565b9173ffffffffffffffffffffffffffffffffffffffff806002541633036112be578216156121b657509061059791612643565b83517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b91503461111e57837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e5773ffffffffffffffffffffffffffffffffffffffff918260035416330361226457505061223d9060065416612594565b517f014f4edb46826c5e74e23ca091de2d3fdfe2cc9d62b5eebf7f5a63eff16d55be8282a1f35b7f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b67ffffffffffffffff81116122e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176122e857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176122e857604052565b67ffffffffffffffff81116122e857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156122ac578035906123c582612374565b926123d36040519485612333565b828452602083830101116122ac57816000926020809301838601378301015290565b60005b8381106124085750506000910152565b81810151838201526020016123f8565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093612454815180928187528780880191016123f5565b0116010190565b90600182811c921680156124a4575b602083101461247557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161246a565b90604051918260008254926124c28461245b565b90818452600194858116908160001461253157506001146124ee575b50506124ec92500383612333565b565b9093915060005260209081600020936000915b8183106125195750506124ec935082010138806124de565b85548884018501529485019487945091830191612501565b90506124ec9550602093507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138806124de565b519073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b73ffffffffffffffffffffffffffffffffffffffff8091168015612619577f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b70719160609160055491817fffffffffffffffffffffffff000000000000000000000000000000000000000084161760055560405192168252602082015260016040820152a1565b60046040517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8151156126de5773ffffffffffffffffffffffffffffffffffffffff918260045416803b156122ac576126b89360008094604051968795869485937f4f1ef286000000000000000000000000000000000000000000000000000000008552166004840152604060248401526044830190612418565b03925af180156126d2576126c95750565b6124ec906122d4565b6040513d6000823e3d90fd5b60045473ffffffffffffffffffffffffffffffffffffffff9081169250823b156122ac5760246000928360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af180156126d2576126c9575056fea26469706673582212203b473bc68bd1fee29b20fae64e02cad9bb792d075050136a1f84bb2feb42d3fb64736f6c63430008100033", + "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c918263230eae2f146121dd5750816324e0f57e1461212c57816326782247146120d957816333a861e01461207d578163402bbfb5146120165781634125ff9014611fda5781634859e38214611f8757816351710e4514611ece5781635bb4780814611deb5781635c60da1b1461112257816364d6235314611b045781636a42b8f814611ac95781636d435421146119ca5781637babfffc1461188f5781639068c51a146115b657816390c210bf146112e6578163913ee93d146111af57816392caa08b146111755781639d492a2c14611122578163addd34f514610e30578163c45a015514610ddb578163c780b63d14610c78578163c89e436114610c25578163d0ff6fc114610bd2578163d29a53df1461082e578163e03b874114610767578163e6d15e1b146103a1578163ea1466d3146102c9578163f0025d96146101c4575063f851a4401461016f57600080fd5b346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600254169051908152f35b5080fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576007549073ffffffffffffffffffffffffffffffffffffffff90818316330361029e57507fffffffffffffffffffffffff0000000000000000000000000000000000000000918216600755600280543393811684179091558351911673ffffffffffffffffffffffffffffffffffffffff16815260208101919091527ffd11f9fc2b7f18358a6f98ed3df762cdba9d98f2365d3021b5fd38d1240b0fad9080604081015b0390a151f35b83517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576008549073ffffffffffffffffffffffffffffffffffffffff90818316330361029e57507fffffffffffffffffffffffff0000000000000000000000000000000000000000918216600855600380543393811684179091558351911673ffffffffffffffffffffffffffffffffffffffff16815260208101919091527fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c7908060408101610298565b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577f90c210bf000000000000000000000000000000000000000000000000000000008060005260016020908082528460002061041c8287519261041284612317565b80548452016124ae565b83820152600281511061073f575160005481018091116107115742106106e957826000528082526104518186600020016124ae565b92600052808252846000208181558186519161046c83612317565b818352843681850137019181519167ffffffffffffffff968784116106bb5750610496845461245b565b601f8111610672575b508490601f84116001146105d1576000918491826105a6575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b81518201916060818385019403126105a257610506828201612573565b93610512868301612573565b91606081015191821161059a57019183603f8401121561059e578083015161053981612374565b9461054688519687612333565b81865287828601011161059a57610584938761056593870191016123f5565b73ffffffffffffffffffffffffffffffffffffffff8091169316612594565b8161058e57505051f35b61059791612643565b51f35b8780fd5b8680fd5b8580fd5b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104b8565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084939416918560005283876000209360005b898883831061065b5750505010610624575b505050811b0190556104e9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610617565b868601518855909601959485019487935001610605565b8460005285600020601f850160051c8101918786106106b1575b601f0160051c019083905b8281106106a557505061049f565b60008155018390610697565b909150819061068c565b6041907f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8385517f47e103ca000000000000000000000000000000000000000000000000000000008152fd5b6011857f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8486517f4f6c1185000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55760035473ffffffffffffffffffffffffffffffffffffffff81169182330361029e57507fffffffffffffffffffffffff000000000000000000000000000000000000000016600355815173ffffffffffffffffffffffffffffffffffffffff9091168152600060208201527fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c7908060408101610298565b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577faddd34f5000000000000000000000000000000000000000000000000000000009081600052600190602092828452846000206108a18487519261041284612317565b858201526002815110610baa57516000548101809111610b7c574210610b5457806000528284526108d68386600020016124ae565b9060005282845284600020838155838651916108f183612317565b818352863681850137019080519067ffffffffffffffff8211610b2657819061091a845461245b565b601f8111610ad3575b508790601f8311600114610a3657600092610a2b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82871b9260031b1c19161790555b83818051810103126105a257839061099973ffffffffffffffffffffffffffffffffffffffff95869201612573565b16918215610a045750600680547fffffffffffffffffffffffff000000000000000000000000000000000000000081168417909155855194168452830152818301527ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c90606090a151f35b85517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b015190503880610939565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08894169185600052896000209260005b8b828210610abd5750508411610a86575b505050811b01905561096a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610a79565b8385015186558b97909501949384019301610a68565b9091508360005287600020601f840160051c810191898510610b1c575b84939291601f8a920160051c01915b828110610b0d575050610923565b60008155859450899101610aff565b9091508190610af0565b6041857f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b5083517f47e103ca000000000000000000000000000000000000000000000000000000008152fd5b6011837f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b8286517f4f6c1185000000000000000000000000000000000000000000000000000000008152fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600354169051908152f35b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55760025473ffffffffffffffffffffffffffffffffffffffff9182821690813303610db45750907ffd11f9fc2b7f18358a6f98ed3df762cdba9d98f2365d3021b5fd38d1240b0fad610d847fd0f8e6a439689cb66a57cb879faad9da11c6b662caf1ec096fef086d15ea16c79493600354937fffffffffffffffffffffffff0000000000000000000000000000000000000000809116600255808516600355806007541660075560085416600855865191829182602060009193929373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0390a18351911673ffffffffffffffffffffffffffffffffffffffff168152600060208201528060408101610298565b84517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b828434610e2d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610e2d575073ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b80fd5b9050346102c557602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e57610e6b612289565b9173ffffffffffffffffffffffffffffffffffffffff806002541633036110f657806006541693169182156110cf578383146110cf578451908383830152828252610eb582612317565b7faddd34f50000000000000000000000000000000000000000000000000000000060005260018084528087600020428155019280519267ffffffffffffffff84116106bb5750610f05845461245b565b601f8111611086575b508490601f8411600114610fbe579183807ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c999795936060999795600093610f93575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b85519283528201528484820152a151f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff38610f51565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0849394169185600052866000209260005b8181106110715750917ff296648dbd7a1f6fa8844476fcafe111c6c359f4205835a5ceab8be87deead7c99979593918560609a9896941061103a575b505050811b019055610f82565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061102d565b82840151855593860193928801928801610ff1565b8460005285600020601f850160051c8101918786106110c5575b601f0160051c019083905b8281106110b9575050610f0e565b600081550183906110ab565b90915081906110a0565b84517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8285517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600554169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020905160018152f35b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576111e8612289565b9073ffffffffffffffffffffffffffffffffffffffff908160025416918233036112be578316908115611297578282146112975750600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055825173ffffffffffffffffffffffffffffffffffffffff9182168152911660208201527fc84b53e36f9cc4d47cde3c091e2817c6da2d24e3acf415caa7162388440c41cd908060408101610298565b84517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b5083517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c55761131f612289565b906113286122b1565b67ffffffffffffffff9160443583811161059e5761134990369083016123ae565b9273ffffffffffffffffffffffffffffffffffffffff938460025416330361158e57848060055416961694851561156657868614611566576113a688519283926020978989860152168a8401526060808401526080830190612418565b036113d77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe091828101845283612333565b7f90c210bf000000000000000000000000000000000000000000000000000000006000526001918286528289600020428155019481519485116106bb575061141f855461245b565b601f811161151d575b508591601f85116001146114ac57509183807f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b7071999795936060999795600093610f935750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c191617905585519283528201528484820152a151f35b849394929192169185600052866000209260005b8181106115085750917f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b707199979593918560609a9896941061103a57505050811b019055610f82565b828401518555938601939288019288016114c0565b8560005286600020601f860160051c81019188871061155c575b601f0160051c019084905b828110611550575050611428565b60008155018490611542565b9091508190611537565b8388517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8287517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5577f64d623530000000000000000000000000000000000000000000000000000000080600052600190602090828252846000206116288487519261041284612317565b83820152600281511061073f575160005481018091116107115742106106e9578060005282825261165d8386600020016124ae565b90600052828252846000208381558386519161167883612317565b818352843681850137019080519067ffffffffffffffff82116118615781906116a1845461245b565b601f811161180e575b508590601f831160011461177157600092611766575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82871b9260031b1c19161790555b81818051810103126105a257810151926224ea00841161173f575082855583519283528201527fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f908290a151f35b84517f4fbe5dba000000000000000000000000000000000000000000000000000000008152fd5b0151905038806116c0565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08894169185600052876000209260005b898282106117f857505084116117c1575b505050811b0190556116f1565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880806117b4565b8385015186558b979095019493840193016117a3565b9091508360005285600020601f840160051c810191878510611857575b84939291601f8a920160051c01915b8281106118485750506116aa565b6000815585945089910161183a565b909150819061182b565b6041877f4e487b71000000000000000000000000000000000000000000000000000000006000525260246000fd5b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5576118c8612289565b9073ffffffffffffffffffffffffffffffffffffffff806002541633036119a25780831690811561197a5760035416918282146112975750600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055825173ffffffffffffffffffffffffffffffffffffffff9182168152911660208201527fb3efe8834d414d488190f39a997544d1e941aa3e5ebad80baa2abd82015482bf908060408101610298565b8285517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b5082517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557611a02612289565b611a0a6122b1565b9073ffffffffffffffffffffffffffffffffffffffff9081600254163303611aa15790808694939216803b15611a9d57849283602492885196879586947ff2fde38b00000000000000000000000000000000000000000000000000000000865216908401525af18015611a9057611a8057505051f35b611a89906122d4565b6101c05751f35b50505051903d90823e3d90fd5b8480fd5b8385517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602091549051908152f35b9050346102c5576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e5781359073ffffffffffffffffffffffffffffffffffffffff600254163303611dc3576224ea008211611d9b578351928282850152818452611b7684612317565b7f64d62353000000000000000000000000000000000000000000000000000000006000526001908183528186600020428155019185519167ffffffffffffffff83116106bb575091869493918893611bce835461245b565b601f8111611d3e575b508397601f8311600114611c7a57827fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f998192600093611c4f575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b8351928352820152a151f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff38611c12565b977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0839293169084600052856000209160005b818110611d23575099837fc5a1c5c7b7c9e42e6bbead55c3e21bfe68d5950bf1b26e6f75df442bec11038f9b10611cec575b505050811b019055611c43565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080611cdf565b8b83015184558c9a508d985092850192918701918701611cad565b91939596509180945060005284600020601f840160051c810191868510611d91575b918a959391601f8b999896940160051c01905b818110611d805750611bd7565b600081558a98508b96508201611d73565b9091508190611d60565b8284517f4fbe5dba000000000000000000000000000000000000000000000000000000008152fd5b8284517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557611e24612289565b73ffffffffffffffffffffffffffffffffffffffff80600254163303611dc357825491818316611ea65716908115611e7e577fffffffffffffffffffffffff00000000000000000000000000000000000000001617905551f35b8284517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b8385517f5763f48e000000000000000000000000000000000000000000000000000000008152fd5b839150346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057611f08612289565b73ffffffffffffffffffffffffffffffffffffffff90816002541633036110f6571690813b156102c557829182918551809481937f79ba50970000000000000000000000000000000000000000000000000000000083525af18015611f7d57611f7057509051f35b611f79906122d4565b9051f35b83513d84823e3d90fd5b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600854169051908152f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602090516224ea008152f35b9050346102c55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c5579181923581526001602052206120796120646001835493016124ae565b83519384938452806020850152830190612418565b0390f35b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0578051612079916120bc82612317565b600182526020368184013751918291602083526020830190612418565b5050346101c057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b9050346102c557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102c557612164612289565b60243567ffffffffffffffff8111611a9d5761218390369084016123ae565b9173ffffffffffffffffffffffffffffffffffffffff806002541633036112be578216156121b657509061059791612643565b83517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b91503461111e57837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261111e5773ffffffffffffffffffffffffffffffffffffffff918260035416330361226457505061223d9060065416612594565b517f014f4edb46826c5e74e23ca091de2d3fdfe2cc9d62b5eebf7f5a63eff16d55be8282a1f35b7f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b67ffffffffffffffff81116122e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176122e857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176122e857604052565b67ffffffffffffffff81116122e857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156122ac578035906123c582612374565b926123d36040519485612333565b828452602083830101116122ac57816000926020809301838601378301015290565b60005b8381106124085750506000910152565b81810151838201526020016123f8565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093612454815180928187528780880191016123f5565b0116010190565b90600182811c921680156124a4575b602083101461247557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161246a565b90604051918260008254926124c28461245b565b90818452600194858116908160001461253157506001146124ee575b50506124ec92500383612333565b565b9093915060005260209081600020936000915b8183106125195750506124ec935082010138806124de565b85548884018501529485019487945091830191612501565b90506124ec9550602093507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138806124de565b519073ffffffffffffffffffffffffffffffffffffffff821682036122ac57565b73ffffffffffffffffffffffffffffffffffffffff8091168015612619577f9c330345d9c36f7cf94243f2b70f88d8ae30322193ae0cb95cce75780d4b70719160609160055491817fffffffffffffffffffffffff000000000000000000000000000000000000000084161760055560405192168252602082015260016040820152a1565b60046040517f68155f9a000000000000000000000000000000000000000000000000000000008152fd5b8151156126de5773ffffffffffffffffffffffffffffffffffffffff918260045416803b156122ac576126b89360008094604051968795869485937f4f1ef286000000000000000000000000000000000000000000000000000000008552166004840152604060248401526044830190612418565b03925af180156126d2576126c95750565b6124ec906122d4565b6040513d6000823e3d90fd5b60045473ffffffffffffffffffffffffffffffffffffffff9081169250823b156122ac5760246000928360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af180156126d2576126c9575056fea26469706673582212203b473bc68bd1fee29b20fae64e02cad9bb792d075050136a1f84bb2feb42d3fb64736f6c63430008100033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 9385, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "delay", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 9390, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "timelockData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(TimelockData)9395_storage)" + }, + { + "astId": 7643, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "admin", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 7645, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "delegate", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 7647, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "factory", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 7649, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "coreImplementation", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 7651, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "fallbackImplementation", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 7653, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "pendingAdmin", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 7655, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "pendingDelegate", + "offset": 0, + "slot": "8", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(TimelockData)9395_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct Timelock.TimelockData)", + "numberOfBytes": "32", + "value": "t_struct(TimelockData)9395_storage" + }, + "t_struct(TimelockData)9395_storage": { + "encoding": "inplace", + "label": "struct Timelock.TimelockData", + "members": [ + { + "astId": 9392, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "timestamp", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 9394, + "contract": "contracts/EnsoBeacon.sol:EnsoBeacon", + "label": "value", + "offset": 0, + "slot": "1", + "type": "t_bytes_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/linea/EnsoWallet.json b/deployments/linea/EnsoWallet.json new file mode 100644 index 0000000..5a1b9c5 --- /dev/null +++ b/deployments/linea/EnsoWallet.json @@ -0,0 +1,802 @@ +{ + "address": "0xb6Bc9B50b4AC1397AB03d8a24d8fa529a5070ff0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "command_index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "ExecutionFailed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArrayLength", + "type": "error" + }, + { + "inputs": [], + "name": "NoDelegateCalls", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "UnsafeSetting", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ExecutionFromModuleFailure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ExecutionFromModuleSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "permission", + "type": "bool" + } + ], + "name": "PermissionSet", + "type": "event" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MODULE_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OWNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum IModuleManager.Operation", + "name": "operation", + "type": "uint8" + } + ], + "name": "execTransactionFromModule", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum IModuleManager.Operation", + "name": "operation", + "type": "uint8" + } + ], + "name": "execTransactionFromModuleReturnData", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "executeShortcut", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "internalType": "struct MinimalWallet.ApprovalNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "revokeApprovals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC1155Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "erc20", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC20Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC721Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bool", + "name": "permission", + "type": "bool" + } + ], + "name": "setPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct MinimalWallet.TransferNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC1155s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20[]", + "name": "erc20s", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC20s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "withdrawERC721s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x4141702b3d863003f8e1a17ed15158e3b87b7b429ca580955a02b9591694e96d", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x826e0BB2276271eFdF2a500597f37b94f6c153bA", + "contractAddress": null, + "transactionIndex": 4, + "gasUsed": "3294661", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf8469fc001b3e7ff919a17896d8e850dcc0c112bae94bb778a3fe9c4766d6c49", + "transactionHash": "0x4141702b3d863003f8e1a17ed15158e3b87b7b429ca580955a02b9591694e96d", + "logs": [], + "blockNumber": 1195801, + "cumulativeGasUsed": "3388077", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "6e9a09176756a7e15ef5f84545755d11", + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"command_index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"ExecutionFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoDelegateCalls\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsafeSetting\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ExecutionFromModuleFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ExecutionFromModuleSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"permission\",\"type\":\"bool\"}],\"name\":\"PermissionSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXECUTOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MODULE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum IModuleManager.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"execTransactionFromModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enum IModuleManager.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"execTransactionFromModuleReturnData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"shortcutId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"commands\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"state\",\"type\":\"bytes[]\"}],\"name\":\"executeShortcut\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"returnData\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"shortcutId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"commands\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"state\",\"type\":\"bytes[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum MinimalWallet.Protocol\",\"name\":\"protocol\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"internalType\":\"struct MinimalWallet.ApprovalNote[]\",\"name\":\"notes\",\"type\":\"tuple[]\"}],\"name\":\"revokeApprovals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"erc1155\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC1155Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC20Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"erc721\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC721Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"permission\",\"type\":\"bool\"}],\"name\":\"setPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum MinimalWallet.Protocol\",\"name\":\"protocol\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct MinimalWallet.TransferNote[]\",\"name\":\"notes\",\"type\":\"tuple[]\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"erc1155\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC1155s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"erc20s\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC20s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"erc721\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC721s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"execTransactionFromModule(address,uint256,bytes,uint8)\":{\"details\":\"Allows a Module to execute a Safe transaction without any further confirmations.\",\"params\":{\"data\":\"Data payload of module transaction.\",\"operation\":\"Operation type of module transaction.\",\"to\":\"Destination address of module transaction.\",\"value\":\"Ether value of module transaction.\"}},\"execTransactionFromModuleReturnData(address,uint256,bytes,uint8)\":{\"details\":\"Allows a Module to execute a Safe transaction without any further confirmations and return data\",\"params\":{\"data\":\"Data payload of module transaction.\",\"operation\":\"Operation type of module transaction.\",\"to\":\"Destination address of module transaction.\",\"value\":\"Ether value of module transaction.\"}},\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/EnsoWallet.sol\":\"EnsoWallet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@ensofinance/weiroll/contracts/CommandBuilder.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nlibrary CommandBuilder {\\n uint256 constant IDX_VARIABLE_LENGTH = 0x80;\\n uint256 constant IDX_VALUE_MASK = 0x7f;\\n uint256 constant IDX_END_OF_ARGS = 0xff;\\n uint256 constant IDX_USE_STATE = 0xfe;\\n uint256 constant IDX_ARRAY_START = 0xfd;\\n uint256 constant IDX_TUPLE_START = 0xfc;\\n uint256 constant IDX_DYNAMIC_END = 0xfb;\\n\\n function buildInputs(\\n bytes[] memory state,\\n bytes4 selector,\\n bytes32 indices,\\n uint256 indicesLength\\n ) internal view returns (bytes memory ret) {\\n uint256 idx; // The current command index\\n uint256 offsetIdx; // The index of the current free offset\\n\\n uint256 count; // Number of bytes in whole ABI encoded message\\n uint256 free; // Pointer to first free byte in tail part of message\\n uint256[] memory dynamicLengths = new uint256[](10); // Optionally store the length of all dynamic types (a command cannot fit more than 10 dynamic types)\\n\\n bytes memory stateData; // Optionally encode the current state if the call requires it\\n\\n // Determine the length of the encoded data\\n for (uint256 i; i < indicesLength; ) {\\n idx = uint8(indices[i]);\\n if (idx == IDX_END_OF_ARGS) {\\n indicesLength = i;\\n break;\\n }\\n if (idx & IDX_VARIABLE_LENGTH != 0) {\\n if (idx == IDX_USE_STATE) {\\n if (stateData.length == 0) {\\n stateData = abi.encode(state);\\n }\\n unchecked {\\n count += stateData.length;\\n }\\n } else {\\n (dynamicLengths, offsetIdx, count, i) = setupDynamicType(\\n state,\\n indices,\\n dynamicLengths,\\n idx,\\n offsetIdx,\\n count,\\n i\\n );\\n }\\n } else {\\n count = setupStaticVariable(state, count, idx);\\n }\\n unchecked {\\n free += 32;\\n ++i;\\n }\\n }\\n\\n // Encode it\\n ret = new bytes(count + 4);\\n assembly {\\n mstore(add(ret, 32), selector)\\n }\\n offsetIdx = 0;\\n // Use count to track current memory slot\\n assembly {\\n count := add(ret, 36)\\n }\\n for (uint256 i; i < indicesLength; ) {\\n idx = uint8(indices[i]);\\n if (idx & IDX_VARIABLE_LENGTH != 0) {\\n if (idx == IDX_USE_STATE) {\\n assembly {\\n mstore(count, free)\\n }\\n memcpy(stateData, 32, ret, free + 4, stateData.length - 32);\\n unchecked {\\n free += stateData.length - 32;\\n }\\n } else if (idx == IDX_ARRAY_START) {\\n // Start of dynamic type, put pointer in current slot\\n assembly {\\n mstore(count, free)\\n }\\n (offsetIdx, free, i, ) = encodeDynamicArray(\\n ret,\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n free,\\n i\\n );\\n } else if (idx == IDX_TUPLE_START) {\\n // Start of dynamic type, put pointer in current slot\\n assembly {\\n mstore(count, free)\\n }\\n (offsetIdx, free, i, ) = encodeDynamicTuple(\\n ret,\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n free,\\n i\\n );\\n } else {\\n // Variable length data\\n uint256 argLen = state[idx & IDX_VALUE_MASK].length;\\n // Put a pointer in the current slot and write the data to first free slot\\n assembly {\\n mstore(count, free)\\n }\\n memcpy(\\n state[idx & IDX_VALUE_MASK],\\n 0,\\n ret,\\n free + 4,\\n argLen\\n );\\n unchecked {\\n free += argLen;\\n }\\n }\\n } else {\\n // Fixed length data (length previously checked to be 32 bytes)\\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\\n // Write the data to current slot\\n assembly {\\n mstore(count, mload(add(stateVar, 32)))\\n }\\n }\\n unchecked {\\n count += 32;\\n ++i;\\n }\\n }\\n }\\n\\n function setupStaticVariable(\\n bytes[] memory state,\\n uint256 count,\\n uint256 idx\\n ) internal pure returns (uint256 newCount) {\\n require(\\n state[idx & IDX_VALUE_MASK].length == 32,\\n \\\"Static state variables must be 32 bytes\\\"\\n );\\n unchecked {\\n newCount = count + 32;\\n }\\n }\\n\\n function setupDynamicVariable(\\n bytes[] memory state,\\n uint256 count,\\n uint256 idx\\n ) internal pure returns (uint256 newCount) {\\n bytes memory arg = state[idx & IDX_VALUE_MASK];\\n // Validate the length of the data in state is a multiple of 32\\n uint256 argLen = arg.length;\\n require(\\n argLen != 0 && argLen % 32 == 0,\\n \\\"Dynamic state variables must be a multiple of 32 bytes\\\"\\n );\\n // Add the length of the value, rounded up to the next word boundary, plus space for pointer\\n unchecked {\\n newCount = count + argLen + 32;\\n }\\n }\\n\\n function setupDynamicType(\\n bytes[] memory state,\\n bytes32 indices,\\n uint256[] memory dynamicLengths,\\n uint256 idx,\\n uint256 offsetIdx,\\n uint256 count,\\n uint256 index\\n ) internal view returns (\\n uint256[] memory newDynamicLengths,\\n uint256 newOffsetIdx,\\n uint256 newCount,\\n uint256 newIndex\\n ) {\\n if (idx == IDX_ARRAY_START) {\\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicArray(\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n count,\\n index\\n );\\n } else if (idx == IDX_TUPLE_START) {\\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicTuple(\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n count,\\n index\\n );\\n } else {\\n newDynamicLengths = dynamicLengths;\\n newOffsetIdx = offsetIdx;\\n newIndex = index;\\n newCount = setupDynamicVariable(state, count, idx);\\n }\\n }\\n\\n function setupDynamicArray(\\n bytes[] memory state,\\n bytes32 indices,\\n uint256[] memory dynamicLengths,\\n uint256 offsetIdx,\\n uint256 count,\\n uint256 index\\n ) internal view returns (\\n uint256[] memory newDynamicLengths,\\n uint256 newOffsetIdx,\\n uint256 newCount,\\n uint256 newIndex\\n ) {\\n // Current idx is IDX_ARRAY_START, next idx will contain the array length\\n unchecked {\\n newIndex = index + 1;\\n newCount = count + 32;\\n }\\n uint256 idx = uint8(indices[newIndex]);\\n require(\\n state[idx & IDX_VALUE_MASK].length == 32,\\n \\\"Array length must be 32 bytes\\\"\\n );\\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicTuple(\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n newCount,\\n newIndex\\n );\\n }\\n\\n function setupDynamicTuple(\\n bytes[] memory state,\\n bytes32 indices,\\n uint256[] memory dynamicLengths,\\n uint256 offsetIdx,\\n uint256 count,\\n uint256 index\\n ) internal view returns (\\n uint256[] memory newDynamicLengths,\\n uint256 newOffsetIdx,\\n uint256 newCount,\\n uint256 newIndex\\n ) {\\n uint256 idx;\\n uint256 offset;\\n newDynamicLengths = dynamicLengths;\\n // Progress to first index of the data and progress the next offset idx\\n unchecked {\\n newIndex = index + 1;\\n newOffsetIdx = offsetIdx + 1;\\n newCount = count + 32;\\n }\\n while (newIndex < 32) {\\n idx = uint8(indices[newIndex]);\\n if (idx & IDX_VARIABLE_LENGTH != 0) {\\n if (idx == IDX_DYNAMIC_END) {\\n newDynamicLengths[offsetIdx] = offset;\\n // explicit return saves gas \\u00af\\\\_(\\u30c4)_/\\u00af\\n return (newDynamicLengths, newOffsetIdx, newCount, newIndex);\\n } else {\\n require(idx != IDX_USE_STATE, \\\"Cannot use state from inside dynamic type\\\");\\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicType(\\n state,\\n indices,\\n newDynamicLengths,\\n idx,\\n newOffsetIdx,\\n newCount,\\n newIndex\\n );\\n }\\n } else {\\n newCount = setupStaticVariable(state, newCount, idx);\\n }\\n unchecked {\\n offset += 32;\\n ++newIndex;\\n }\\n }\\n revert(\\\"Dynamic type was not properly closed\\\");\\n }\\n\\n function encodeDynamicArray(\\n bytes memory ret,\\n bytes[] memory state,\\n bytes32 indices,\\n uint256[] memory dynamicLengths,\\n uint256 offsetIdx,\\n uint256 currentSlot,\\n uint256 index\\n ) internal view returns (\\n uint256 newOffsetIdx,\\n uint256 newSlot,\\n uint256 newIndex,\\n uint256 length\\n ) {\\n // Progress to array length metadata\\n unchecked {\\n newIndex = index + 1;\\n newSlot = currentSlot + 32;\\n }\\n // Encode array length\\n uint256 idx = uint8(indices[newIndex]);\\n // Array length value previously checked to be 32 bytes\\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\\n assembly {\\n mstore(add(add(ret, 36), currentSlot), mload(add(stateVar, 32)))\\n }\\n (newOffsetIdx, newSlot, newIndex, length) = encodeDynamicTuple(\\n ret,\\n state,\\n indices,\\n dynamicLengths,\\n offsetIdx,\\n newSlot,\\n newIndex\\n );\\n unchecked {\\n length += 32; // Increase length to account for array length metadata\\n }\\n }\\n\\n function encodeDynamicTuple(\\n bytes memory ret,\\n bytes[] memory state,\\n bytes32 indices,\\n uint256[] memory dynamicLengths,\\n uint256 offsetIdx,\\n uint256 currentSlot,\\n uint256 index\\n ) internal view returns (\\n uint256 newOffsetIdx,\\n uint256 newSlot,\\n uint256 newIndex,\\n uint256 length\\n ) {\\n uint256 idx;\\n uint256 argLen;\\n uint256 freePointer = dynamicLengths[offsetIdx]; // The pointer to the next free slot\\n unchecked {\\n newSlot = currentSlot + freePointer; // Update the next slot\\n newOffsetIdx = offsetIdx + 1; // Progress to next offsetIdx\\n newIndex = index + 1; // Progress to first index of the data\\n }\\n // Shift currentSlot to correct location in memory\\n assembly {\\n currentSlot := add(add(ret, 36), currentSlot)\\n }\\n while (newIndex < 32) {\\n idx = uint8(indices[newIndex]);\\n if (idx & IDX_VARIABLE_LENGTH != 0) {\\n if (idx == IDX_DYNAMIC_END) {\\n break;\\n } else if (idx == IDX_ARRAY_START) {\\n // Start of dynamic type, put pointer in current slot\\n assembly {\\n mstore(currentSlot, freePointer)\\n }\\n (newOffsetIdx, newSlot, newIndex, argLen) = encodeDynamicArray(\\n ret,\\n state,\\n indices,\\n dynamicLengths,\\n newOffsetIdx,\\n newSlot,\\n newIndex\\n );\\n unchecked {\\n freePointer += argLen;\\n length += (argLen + 32); // data + pointer\\n }\\n } else if (idx == IDX_TUPLE_START) {\\n // Start of dynamic type, put pointer in current slot\\n assembly {\\n mstore(currentSlot, freePointer)\\n }\\n (newOffsetIdx, newSlot, newIndex, argLen) = encodeDynamicTuple(\\n ret,\\n state,\\n indices,\\n dynamicLengths,\\n newOffsetIdx,\\n newSlot,\\n newIndex\\n );\\n unchecked {\\n freePointer += argLen;\\n length += (argLen + 32); // data + pointer\\n }\\n } else {\\n // Variable length data\\n argLen = state[idx & IDX_VALUE_MASK].length;\\n // Start of dynamic type, put pointer in current slot\\n assembly {\\n mstore(currentSlot, freePointer)\\n }\\n memcpy(\\n state[idx & IDX_VALUE_MASK],\\n 0,\\n ret,\\n newSlot + 4,\\n argLen\\n );\\n unchecked {\\n newSlot += argLen;\\n freePointer += argLen;\\n length += (argLen + 32); // data + pointer\\n }\\n }\\n } else {\\n // Fixed length data (length previously checked to be 32 bytes)\\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\\n // Write to first free slot\\n assembly {\\n mstore(currentSlot, mload(add(stateVar, 32)))\\n }\\n unchecked {\\n length += 32;\\n }\\n }\\n unchecked {\\n currentSlot += 32;\\n ++newIndex;\\n }\\n }\\n }\\n\\n function writeOutputs(\\n bytes[] memory state,\\n bytes1 index,\\n bytes memory output\\n ) internal pure returns (bytes[] memory) {\\n uint256 idx = uint8(index);\\n if (idx == IDX_END_OF_ARGS) return state;\\n\\n if (idx & IDX_VARIABLE_LENGTH != 0) {\\n if (idx == IDX_USE_STATE) {\\n state = abi.decode(output, (bytes[]));\\n } else {\\n require(idx & IDX_VALUE_MASK < state.length, \\\"Index out-of-bounds\\\");\\n // Check the first field is 0x20 (because we have only a single return value)\\n uint256 argPtr;\\n assembly {\\n argPtr := mload(add(output, 32))\\n }\\n require(\\n argPtr == 32,\\n \\\"Only one return value permitted (variable)\\\"\\n );\\n\\n assembly {\\n // Overwrite the first word of the return data with the length - 32\\n mstore(add(output, 32), sub(mload(output), 32))\\n // Insert a pointer to the return data, starting at the second word, into state\\n mstore(\\n add(add(state, 32), mul(and(idx, IDX_VALUE_MASK), 32)),\\n add(output, 32)\\n )\\n }\\n }\\n } else {\\n require(idx & IDX_VALUE_MASK < state.length, \\\"Index out-of-bounds\\\");\\n // Single word\\n require(\\n output.length == 32,\\n \\\"Only one return value permitted (static)\\\"\\n );\\n\\n state[idx & IDX_VALUE_MASK] = output;\\n }\\n\\n return state;\\n }\\n\\n function writeTuple(\\n bytes[] memory state,\\n bytes1 index,\\n bytes memory output\\n ) internal view {\\n uint256 idx = uint8(index);\\n if (idx == IDX_END_OF_ARGS) return;\\n\\n bytes memory entry = state[idx & IDX_VALUE_MASK] = new bytes(output.length + 32);\\n memcpy(output, 0, entry, 32, output.length);\\n assembly {\\n let l := mload(output)\\n mstore(add(entry, 32), l)\\n }\\n }\\n\\n function memcpy(\\n bytes memory src,\\n uint256 srcIdx,\\n bytes memory dest,\\n uint256 destIdx,\\n uint256 len\\n ) internal view {\\n assembly {\\n pop(\\n staticcall(\\n gas(),\\n 4,\\n add(add(src, 32), srcIdx),\\n len,\\n add(add(dest, 32), destIdx),\\n len\\n )\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd6f5e1f44b67c4bfd0f3578c998a6cbd0a936b5912d4dfd668291e01979c6aa3\",\"license\":\"GPL-3.0-only\"},\"@ensofinance/weiroll/contracts/VM.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nimport \\\"./CommandBuilder.sol\\\";\\n\\nabstract contract VM {\\n using CommandBuilder for bytes[];\\n\\n uint256 constant FLAG_CT_DELEGATECALL = 0x00; // Delegate call not currently supported\\n uint256 constant FLAG_CT_CALL = 0x01;\\n uint256 constant FLAG_CT_STATICCALL = 0x02;\\n uint256 constant FLAG_CT_VALUECALL = 0x03;\\n uint256 constant FLAG_CT_MASK = 0x03;\\n uint256 constant FLAG_DATA = 0x20;\\n uint256 constant FLAG_EXTENDED_COMMAND = 0x40;\\n uint256 constant FLAG_TUPLE_RETURN = 0x80;\\n\\n uint256 constant SHORT_COMMAND_FILL =\\n 0x000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\\n\\n error ExecutionFailed(\\n uint256 command_index,\\n address target,\\n string message\\n );\\n\\n function _execute(bytes32[] calldata commands, bytes[] memory state)\\n internal\\n returns (bytes[] memory)\\n {\\n bytes32 command;\\n uint256 flags;\\n bytes32 indices;\\n\\n bool success;\\n bytes memory outData;\\n\\n uint256 commandsLength = commands.length;\\n uint256 indicesLength;\\n for (uint256 i; i < commandsLength; i = _uncheckedIncrement(i)) {\\n command = commands[i];\\n flags = uint256(uint8(bytes1(command << 32)));\\n\\n if (flags & FLAG_EXTENDED_COMMAND != 0) {\\n i = _uncheckedIncrement(i);\\n indices = commands[i];\\n indicesLength = 32;\\n } else {\\n indices = bytes32(uint256(command << 40) | SHORT_COMMAND_FILL);\\n indicesLength = 6;\\n }\\n\\n if (flags & FLAG_CT_MASK == FLAG_CT_CALL) {\\n (success, outData) = address(uint160(uint256(command))).call( // target\\n // inputs\\n flags & FLAG_DATA == 0\\n ? state.buildInputs(\\n bytes4(command), // selector\\n indices,\\n indicesLength\\n )\\n : state[\\n uint8(bytes1(indices)) &\\n CommandBuilder.IDX_VALUE_MASK\\n ]\\n );\\n } else if (flags & FLAG_CT_MASK == FLAG_CT_STATICCALL) {\\n (success, outData) = address(uint160(uint256(command))) // target\\n .staticcall(\\n // inputs\\n flags & FLAG_DATA == 0\\n ? state.buildInputs(\\n bytes4(command), // selector\\n indices,\\n indicesLength\\n )\\n : state[\\n uint8(bytes1(indices)) &\\n CommandBuilder.IDX_VALUE_MASK\\n ]\\n );\\n } else if (flags & FLAG_CT_MASK == FLAG_CT_VALUECALL) {\\n bytes memory v = state[\\n uint8(bytes1(indices)) &\\n CommandBuilder.IDX_VALUE_MASK\\n ];\\n require(v.length == 32, \\\"Value must be 32 bytes\\\");\\n uint256 callEth = uint256(bytes32(v));\\n (success, outData) = address(uint160(uint256(command))).call{ // target\\n value: callEth\\n }(\\n // inputs\\n flags & FLAG_DATA == 0\\n ? state.buildInputs(\\n bytes4(command), // selector\\n indices << 8, // skip value input\\n indicesLength - 1 // max indices length reduced by value input\\n )\\n : state[\\n uint8(bytes1(indices << 8)) & // first byte after value input\\n CommandBuilder.IDX_VALUE_MASK\\n ]\\n );\\n } else {\\n revert(\\\"Invalid calltype\\\");\\n }\\n\\n if (!success) {\\n string memory message = \\\"Unknown\\\";\\n if (outData.length > 68) {\\n // This might be an error message, parse the outData\\n // Estimate the bytes length of the possible error message\\n uint256 estimatedLength = _estimateBytesLength(outData, 68);\\n // Remove selector. First 32 bytes should be a pointer that indicates the start of data in memory\\n assembly {\\n outData := add(outData, 4)\\n }\\n uint256 pointer = uint256(bytes32(outData));\\n if (pointer == 32) {\\n // Remove pointer. If it is a string, the next 32 bytes will hold the size\\n assembly {\\n outData := add(outData, 32)\\n }\\n uint256 size = uint256(bytes32(outData));\\n // If the size variable is the same as the estimated bytes length, we can be fairly certain\\n // this is a dynamic string, so convert the bytes to a string and emit the message. While an\\n // error function with 3 static parameters is capable of producing a similar output, there is\\n // low risk of a contract unintentionally emitting a message.\\n if (size == estimatedLength) {\\n // Remove size. The remaining data should be the string content\\n assembly {\\n outData := add(outData, 32)\\n }\\n message = string(outData);\\n }\\n }\\n }\\n revert ExecutionFailed({\\n command_index: flags & FLAG_EXTENDED_COMMAND == 0\\n ? i\\n : i - 1,\\n target: address(uint160(uint256(command))),\\n message: message\\n });\\n }\\n\\n if (flags & FLAG_TUPLE_RETURN != 0) {\\n state.writeTuple(bytes1(command << 88), outData);\\n } else {\\n state = state.writeOutputs(bytes1(command << 88), outData);\\n }\\n }\\n return state;\\n }\\n\\n function _estimateBytesLength(bytes memory data, uint256 pos) internal pure returns (uint256 estimate) {\\n uint256 length = data.length;\\n estimate = length - pos; // Assume length equals alloted space\\n for (uint256 i = pos; i < length; ) {\\n if (data[i] == 0) {\\n // Zero bytes found, adjust estimated length\\n estimate = i - pos;\\n break;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _uncheckedIncrement(uint256 i) private pure returns (uint256) {\\n unchecked {\\n ++i;\\n }\\n return i;\\n }\\n}\\n\",\"keccak256\":\"0x82074b35c073aac1d4ecabf0d76cdeb597248dc9f9030ca197f4a119941670fe\",\"license\":\"GPL-3.0-only\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\\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(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n 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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) 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\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 IERC20 {\\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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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 IERC20Permit {\\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\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/draft-IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.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 SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit 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(IERC20 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 if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9b72f93be69ca894d8492c244259615c4a742afc8d63720dbc8bb81087d9b238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\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(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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\":\"0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Receiver.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC721Receiver} interface.\\n *\\n * Accepts all token transfers.\\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\\n */\\ncontract ERC721Holder is IERC721Receiver {\\n /**\\n * @dev See {IERC721Receiver-onERC721Received}.\\n *\\n * Always returns `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0x0108bf6a6ebd5f96678bed33a35947537263f96766131ee91461fb6485805028\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // 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(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) 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(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) 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(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) 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(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xda898fa084aa1ddfdb346e6a40459e00a59d87071cce7c315a46d648dd71d0ba\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.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 ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"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\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) 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 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\"},\"contracts/EnsoWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"@ensofinance/weiroll/contracts/VM.sol\\\";\\nimport \\\"./access/AccessController.sol\\\";\\nimport \\\"./wallet/ERC1271.sol\\\";\\nimport \\\"./wallet/MinimalWallet.sol\\\";\\nimport \\\"./wallet/ModuleManager.sol\\\";\\nimport \\\"./interfaces/IEnsoWallet.sol\\\";\\n\\ncontract EnsoWallet is IEnsoWallet, VM, AccessController, ModuleManager, ERC1271, MinimalWallet {\\n using StorageAPI for bytes32;\\n\\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\\n bytes32 internal constant SALT = bytes32(uint256(keccak256(\\\"enso.wallet.salt\\\")) - 1);\\n\\n error AlreadyInit();\\n\\n constructor() {\\n // Set salt to 0xff so that the implementation cannot be initialized\\n SALT.setBytes32(bytes32(type(uint256).max)); \\n }\\n\\n // @notice Initialize wallet by setting state and permissions\\n // @dev A wallet is considered initialized if the SALT is set in state. Subsequent calls to this function will fail.\\n // @param owner The address of the wallet owner\\n // @param salt The salt used to deploy the proxy that uses this contract as it's implementation\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut\\n // @param state The optional state for executing a shortcut\\n function initialize(\\n address owner,\\n bytes32 salt,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) external payable override {\\n if (SALT.getBytes32() != bytes32(0)) revert AlreadyInit();\\n SALT.setBytes32(salt);\\n _setPermission(OWNER_ROLE, owner, true);\\n _setPermission(EXECUTOR_ROLE, owner, true);\\n if (commands.length != 0) {\\n _executeShortcut(shortcutId, commands, state);\\n }\\n }\\n\\n // @notice A function to execute an arbitrary call on another contract\\n // @param target The address of the target contract\\n // @param value The ether value that is to be sent with the call\\n // @param data The call data to be sent to the target\\n function execute(\\n address target,\\n uint256 value,\\n bytes memory data\\n ) external payable isPermitted(EXECUTOR_ROLE) returns (bool success) {\\n return _executeCall(target, value, data);\\n }\\n\\n // @notice Execute a shortcut from this contract\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands An array of bytes32 values that encode calls\\n // @param state An array of bytes that are used to generate call data for each command\\n function executeShortcut(\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) external payable isPermitted(EXECUTOR_ROLE) returns (bytes[] memory returnData) {\\n returnData = _executeShortcut(shortcutId, commands, state);\\n }\\n\\n // @notice Internal function to execute a shortcut from this contract\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands An array of bytes32 values that encode calls\\n // @param state An array of bytes that are used to generate call data for each command\\n function _executeShortcut(\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) internal returns (bytes[] memory returnData) {\\n (shortcutId); // ShortcutId just needs to be retrieved from call data, can support events in future upgrade\\n returnData = _execute(commands, state);\\n }\\n\\n // @notice Internal function to execute an arbitrary call on another contract\\n // @param target The address of the target contract\\n // @param value The ether value that is to be sent with the call\\n // @param data The call data to be sent to the target\\n function _executeCall(\\n address target,\\n uint256 value,\\n bytes memory data\\n ) internal override returns (bool success) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := call(gas(), target, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n\\n // @notice Internal function for checking the ERC-1271 signer\\n // @param signer The address that signed a message\\n function _checkSigner(address signer) internal view override returns (bool) {\\n return _getPermission(OWNER_ROLE, signer);\\n }\\n}\\n\",\"keccak256\":\"0x9d4d4a4d6c993141e673b53afe01bb52c4fd9c2490776f910eb810fbe569ef51\",\"license\":\"GPL-3.0-only\"},\"contracts/access/ACL.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../libraries/StorageAPI.sol\\\";\\n\\nabstract contract ACL {\\n using StorageAPI for bytes32;\\n\\n error NotPermitted();\\n\\n modifier isPermitted(bytes32 role) {\\n bool permitted = _getPermission(role, msg.sender); // TODO: support GSN/Account abstraction\\n if (!permitted) revert NotPermitted();\\n _;\\n }\\n\\n // @notice Gets user permission for a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The permission status\\n function getPermission(bytes32 role, address account) external view returns (bool) {\\n return _getPermission(role, account);\\n }\\n\\n // @notice Internal function to get user permission for a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The permission status\\n function _getPermission(bytes32 role, address account) internal view returns (bool) {\\n bytes32 key = _getKey(role, account);\\n return key.getBool();\\n }\\n\\n // @notice Internal function to get the key for the storage slot\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The bytes32 storage slot\\n function _getKey(bytes32 role, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(role, account));\\n }\\n}\\n\",\"keccak256\":\"0x50bc9b50157b89338a27043a7f24d9f6bc93bf624d93c9a4151d74c99340e6c1\",\"license\":\"GPL-3.0-only\"},\"contracts/access/AccessController.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"./ACL.sol\\\";\\nimport \\\"./Roles.sol\\\";\\n\\n// @notice The OWNER_ROLE must be set in the importing contract's constructor or initialize function\\nabstract contract AccessController is ACL, Roles {\\n using StorageAPI for bytes32;\\n\\n event PermissionSet(bytes32 role, address account, bool permission);\\n\\n error UnsafeSetting();\\n error InvalidAccount();\\n\\n // @notice Sets user permission over a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @param permission The permission status\\n function setPermission(\\n bytes32 role,\\n address account,\\n bool permission\\n ) external isPermitted(OWNER_ROLE) {\\n if (account == address(0)) revert InvalidAccount();\\n if (role == OWNER_ROLE && account == msg.sender && permission == false)\\n revert UnsafeSetting();\\n _setPermission(role, account, permission);\\n }\\n\\n // @notice Internal function to set user permission over a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @param permission The permission status\\n function _setPermission(bytes32 role, address account, bool permission) internal {\\n bytes32 key = _getKey(role, account);\\n key.setBool(permission);\\n emit PermissionSet(role, account, permission);\\n }\\n}\\n\",\"keccak256\":\"0xc896dc98964c5f657ef5c973fac5eec56890c096feae68b934888636d414739b\",\"license\":\"GPL-3.0-only\"},\"contracts/access/Roles.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nabstract contract Roles {\\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\\n bytes32 public constant OWNER_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.owner\\\")) - 1);\\n bytes32 public constant EXECUTOR_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.executor\\\")) - 1);\\n bytes32 public constant MODULE_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.module\\\")) - 1);\\n}\",\"keccak256\":\"0x610f0e86412393a50368863c8c6276e42340535c14c80f9ec126e3c69efd4ad3\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.16;\\n\\ninterface IERC1271 {\\n function isValidSignature(bytes32 _hash, bytes calldata _signature) external view returns (bytes4 magicValue);\\n\\n function isValidSignature(\\n bytes calldata _message,\\n bytes calldata _signature\\n ) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0xa4540ed4dbcd2d919f687fb9412c6cdf5b6d8909e41471efc13b13f962e682bd\",\"license\":\"MIT\"},\"contracts/interfaces/IEnsoWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\ninterface IEnsoWallet {\\n function initialize(\\n address owner,\\n bytes32 salt,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x89b70b390e1f8e2a2dae065ea79a517bd86bb4ea291cb71528705d04c3cc63db\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.16;\\n\\ninterface IModuleManager {\\n enum Operation {Call, DelegateCall}\\n\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Operation operation\\n ) external returns (bool success);\\n\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n}\",\"keccak256\":\"0xe96ade39085920b5c3809665b30e62b6124aab685a8e9c0f155d6f70bf6d7526\",\"license\":\"MIT\"},\"contracts/libraries/StorageAPI.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nlibrary StorageAPI {\\n function setBytes(bytes32 key, bytes memory data) internal {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := mload(data)\\n switch gt(length, 0x1F)\\n case 0x00 {\\n sstore(key, or(mload(add(data, 0x20)), mul(length, 2)))\\n }\\n case 0x01 {\\n sstore(key, add(mul(length, 2), 1))\\n for {\\n let i := 0\\n } lt(mul(i, 0x20), length) {\\n i := add(i, 0x01)\\n } {\\n sstore(add(slot, i), mload(add(data, mul(add(i, 1), 0x20))))\\n }\\n }\\n }\\n }\\n\\n function setBytes32(bytes32 key, bytes32 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setAddress(bytes32 key, address a) internal {\\n assembly {\\n sstore(key, a)\\n }\\n }\\n\\n function setUint256(bytes32 key, uint256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setInt256(bytes32 key, int256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setBool(bytes32 key, bool val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function getBytes(bytes32 key) internal view returns (bytes memory data) {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := sload(key)\\n switch and(length, 0x01)\\n case 0x00 {\\n let decodedLength := div(and(length, 0xFF), 2)\\n mstore(data, decodedLength)\\n mstore(add(data, 0x20), and(length, not(0xFF)))\\n mstore(0x40, add(data, 0x40))\\n }\\n case 0x01 {\\n let decodedLength := div(length, 2)\\n let i := 0\\n mstore(data, decodedLength)\\n for {\\n\\n } lt(mul(i, 0x20), decodedLength) {\\n i := add(i, 0x01)\\n } {\\n mstore(add(add(data, 0x20), mul(i, 0x20)), sload(add(slot, i)))\\n }\\n mstore(0x40, add(data, add(0x20, mul(i, 0x20))))\\n }\\n }\\n }\\n\\n function getBytes32(bytes32 key) internal view returns (bytes32 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getAddress(bytes32 key) internal view returns (address a) {\\n assembly {\\n a := sload(key)\\n }\\n }\\n\\n function getUint256(bytes32 key) internal view returns (uint256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getInt256(bytes32 key) internal view returns (int256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getBool(bytes32 key) internal view returns (bool val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x78e99bac7eb0e62568a67c1dfd3f4d14b9c8be7e866d4205de91f01305e557a8\",\"license\":\"GPL-3.0-only\"},\"contracts/wallet/ERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"../interfaces/IERC1271.sol\\\";\\n\\nabstract contract ERC1271 is IERC1271 {\\n using ECDSA for bytes32;\\n\\n bytes4 internal constant MAGICVALUE_BYTES = 0x20c13b0b;\\n bytes4 internal constant MAGICVALUE_BYTES32 = 0x1626ba7e;\\n bytes4 internal constant INVALID_SIGNATURE = 0xffffffff;\\n\\n // @notice Checks for a valid signature\\n // @param hash A bytes32 hash of a message\\n // @param signature The signed hash of the message\\n function isValidSignature(bytes32 hash, bytes memory signature) public view override returns (bytes4 magicValue) {\\n address signer = hash.recover(signature);\\n magicValue = _checkSigner(signer) ? MAGICVALUE_BYTES32 : INVALID_SIGNATURE;\\n }\\n\\n // @notice Checks for a valid signature\\n // @param message The message that has been signed\\n // @param signature The signed hash of the message\\n function isValidSignature(\\n bytes memory message,\\n bytes memory signature\\n ) public view override returns (bytes4 magicValue) {\\n address signer = ECDSA.toEthSignedMessageHash(message).recover(signature);\\n magicValue = _checkSigner(signer) ? MAGICVALUE_BYTES : INVALID_SIGNATURE;\\n }\\n\\n // @notice Confirm signer is permitted to sign on behalf of contract\\n // @dev Abstract function to implemented by importing contract\\n // @param signer The address of the message signer\\n // @return Bool confirming whether signer is permitted\\n function _checkSigner(address signer) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xd0722988b75fec9a43b0852e9079d96f38ec90624c105f436a9eac7638093e63\",\"license\":\"GPL-3.0-only\"},\"contracts/wallet/MinimalWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport \\\"../access/ACL.sol\\\";\\nimport \\\"../access/Roles.sol\\\";\\n\\ncontract MinimalWallet is ACL, Roles, ERC721Holder, ERC1155Holder {\\n using SafeERC20 for IERC20;\\n\\n enum Protocol {\\n ETH,\\n ERC20,\\n ERC721,\\n ERC1155\\n }\\n\\n struct TransferNote {\\n Protocol protocol;\\n address token;\\n uint256[] ids;\\n uint256[] amounts;\\n }\\n\\n struct ApprovalNote {\\n Protocol protocol;\\n address token;\\n address[] operators;\\n }\\n\\n error WithdrawFailed();\\n error InvalidArrayLength();\\n\\n ////////////////////////////////////////////////////\\n // External functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n // @notice Withdraw an array of assets\\n // @dev Works for ETH, ERC20s, ERC721s, and ERC1155s\\n // @param notes A tuple that contains the protocol id, token address, array of ids and amounts\\n function withdraw(TransferNote[] calldata notes) external isPermitted(OWNER_ROLE) {\\n TransferNote memory note;\\n Protocol protocol;\\n uint256[] memory ids;\\n uint256[] memory amounts;\\n\\n uint256 length = notes.length;\\n for (uint256 i; i < length; ) {\\n note = notes[i];\\n protocol = note.protocol;\\n if (protocol == Protocol.ETH) {\\n amounts = note.amounts;\\n if (amounts.length != 1) revert InvalidArrayLength();\\n _withdrawETH(amounts[0]);\\n } else if (protocol == Protocol.ERC20) {\\n amounts = note.amounts;\\n if (amounts.length != 1) revert InvalidArrayLength();\\n _withdrawERC20(IERC20(note.token), amounts[0]);\\n } else if (protocol == Protocol.ERC721) {\\n ids = note.ids;\\n _withdrawERC721s(IERC721(note.token), ids);\\n } else if (protocol == Protocol.ERC1155) {\\n ids = note.ids;\\n amounts = note.amounts;\\n _withdrawERC1155s(IERC1155(note.token), ids, amounts);\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Withdraw ETH from this contract to the msg.sender\\n // @param amount The amount of ETH to be withdrawn\\n function withdrawETH(uint256 amount) external isPermitted(OWNER_ROLE) {\\n _withdrawETH(amount);\\n }\\n\\n // @notice Withdraw ERC20s\\n // @param erc20s An array of erc20 addresses\\n // @param amounts An array of amounts for each erc20\\n function withdrawERC20s(\\n IERC20[] calldata erc20s,\\n uint256[] calldata amounts\\n ) external isPermitted(OWNER_ROLE) {\\n uint256 length = erc20s.length;\\n if (amounts.length != length) revert InvalidArrayLength();\\n for (uint256 i; i < length; ) {\\n _withdrawERC20(erc20s[i], amounts[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Withdraw multiple ERC721 ids for a single ERC721 contract\\n // @param erc721 The address of the ERC721 contract\\n // @param ids An array of ids that are to be withdrawn\\n function withdrawERC721s(\\n IERC721 erc721,\\n uint256[] calldata ids\\n ) external isPermitted(OWNER_ROLE) {\\n _withdrawERC721s(erc721, ids);\\n }\\n\\n // @notice Withdraw multiple ERC1155 ids for a single ERC1155 contract\\n // @param erc1155 The address of the ERC155 contract\\n // @param ids An array of ids that are to be withdrawn\\n // @param amounts An array of amounts per id\\n function withdrawERC1155s(\\n IERC1155 erc1155,\\n uint256[] calldata ids,\\n uint256[] calldata amounts\\n ) external isPermitted(OWNER_ROLE) {\\n _withdrawERC1155s(erc1155, ids, amounts);\\n }\\n\\n // @notice Revoke approval on an array of assets and operators\\n // @dev Works for ERC20s, ERC721s, and ERC1155s\\n // @param notes A tuple that contains the protocol id, token address, and array of operators\\n function revokeApprovals(ApprovalNote[] calldata notes) external isPermitted(OWNER_ROLE) {\\n ApprovalNote memory note;\\n Protocol protocol;\\n\\n uint256 length = notes.length;\\n for (uint256 i; i < length; ) {\\n note = notes[i];\\n protocol = note.protocol;\\n if (protocol == Protocol.ERC20) {\\n _revokeERC20Approvals(IERC20(note.token), note.operators);\\n } else if (protocol == Protocol.ERC721) {\\n _revokeERC721Approvals(IERC721(note.token), note.operators);\\n } else if (protocol == Protocol.ERC1155) {\\n _revokeERC1155Approvals(IERC1155(note.token), note.operators);\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Revoke approval of an ERC20 for an array of operators\\n // @param erc20 The address of the ERC20 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC20Approvals(\\n IERC20 erc20,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC20Approvals(erc20, operators);\\n }\\n\\n // @notice Revoke approval of an ERC721 for an array of operators\\n // @param erc721 The address of the ERC721 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC721Approvals(\\n IERC721 erc721,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC721Approvals(erc721, operators);\\n }\\n\\n // @notice Revoke approval of an ERC1155 for an array of operators\\n // @param erc1155 The address of the ERC1155 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC1155Approvals(\\n IERC1155 erc1155,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC1155Approvals(erc1155, operators);\\n }\\n\\n ////////////////////////////////////////////////////\\n // Internal functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n function _withdrawETH(uint256 amount) internal {\\n (bool success, ) = msg.sender.call{value: amount}(\\\"\\\");\\n if (!success) revert WithdrawFailed();\\n }\\n\\n function _withdrawERC20(IERC20 erc20, uint256 amount) internal {\\n erc20.safeTransfer(msg.sender, amount);\\n }\\n\\n function _withdrawERC721s(IERC721 erc721, uint256[] memory ids) internal {\\n uint256 length = ids.length;\\n for (uint256 i; i < length; ) {\\n erc721.safeTransferFrom(address(this), msg.sender, ids[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _withdrawERC1155s(IERC1155 erc1155, uint256[] memory ids, uint256[] memory amounts) internal {\\n // safeBatchTransferFrom will validate the array lengths\\n erc1155.safeBatchTransferFrom(address(this), msg.sender, ids, amounts, \\\"\\\");\\n }\\n\\n function _revokeERC20Approvals(IERC20 erc20, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc20.safeApprove(operators[i], 0);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _revokeERC721Approvals(IERC721 erc721, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc721.setApprovalForAll(operators[i], false);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _revokeERC1155Approvals(IERC1155 erc1155, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc1155.setApprovalForAll(operators[i], false);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n ////////////////////////////////////////////////////\\n // Fallback functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x6536a201c06bae58bce6044fb28cef29c88780578dd0bf5b40eba97da8fea228\",\"license\":\"GPL-3.0-only\"},\"contracts/wallet/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../interfaces/IModuleManager.sol\\\";\\nimport \\\"../access/ACL.sol\\\";\\nimport \\\"../access/Roles.sol\\\";\\n\\nabstract contract ModuleManager is IModuleManager, ACL, Roles {\\n\\n error NoDelegateCalls();\\n\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Operation operation\\n ) public virtual isPermitted(MODULE_ROLE) returns (bool success) {\\n if (operation != Operation.Call) revert NoDelegateCalls();\\n success = _executeCall(to, value, data);\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n function _executeCall(\\n address target,\\n uint256 value,\\n bytes memory data\\n ) internal virtual returns (bool success);\\n}\",\"keccak256\":\"0x1f34636aab6d49fabe7a5a78cce95a5c3a8527a48bef992ee213721d4daa3512\",\"license\":\"GPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6080806040523461003b576000197f8ace5aef1887be9219d1b04dbcfb5676ed5a12ec4a1129de5781d4d7ea71c9ed55613a6f90816100418239f35b600080fdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806301ffc9a71461020f57806307bd0265146102065780630fe786e1146101fd578063150b7a02146101f45780631626ba7e146101eb57806320c13b0b146101e257806331b455a5146101d9578063468721a7146101d05780635229073f146101c757806356255c53146101be578063599e4c70146101b557806360d6c7cf146101ac5780638a2685a9146101a35780638fd8d1bb1461019a578063a4508b1f14610191578063a6b520c014610188578063b61d27f61461017f578063bc197c8114610176578063dedd65241461016d578063e1084a1314610164578063e58378bb1461015b578063e5cb370314610152578063f14210a614610149578063f23a6e61146101405763f4adeb750361000e5761013b6117bc565b61000e565b5061013b61172b565b5061013b6116e1565b5061013b6116d2565b5061013b611678565b5061013b611545565b5061013b611384565b5061013b611276565b5061013b611160565b5061013b611106565b5061013b61105e565b5061013b610fc2565b5061013b610e57565b5061013b610e03565b5061013b610ce7565b5061013b610ca7565b5061013b610c04565b5061013b610b77565b5061013b610a8a565b5061013b61079e565b5061013b6106b4565b5061013b610623565b5061013b61041c565b5061013b610373565b50346102cf5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036102cf57807f4e2312e000000000000000000000000000000000000000000000000000000000602092149081156102a5575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861029a565b600080fd5b60009103126102cf57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161033c57565b6103446102df565b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820191821161033c57565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f8152f35b73ffffffffffffffffffffffffffffffffffffffff8116036102cf57565b9181601f840112156102cf5782359167ffffffffffffffff83116102cf576020808501948460051b0101116102cf57565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435610458816103cd565b60243567ffffffffffffffff81116102cf576104789036906004016103eb565b61048492919233612b92565b541561049f5761001992610499913691613268565b90613853565b60046040517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161050d57604052565b6105156104c9565b604052565b6040810190811067ffffffffffffffff82111761050d57604052565b6060810190811067ffffffffffffffff82111761050d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761050d57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff81116105cf575b01160190565b6105d76104c9565b6105c9565b81601f820112156102cf578035906105f382610593565b926106016040519485610552565b828452602083830101116102cf57816000926020809301838601378301015290565b50346102cf5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5761065e6004356103cd565b6106696024356103cd565b60643567ffffffffffffffff81116102cf576106899036906004016105dc565b5060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760243567ffffffffffffffff81116102cf5761071d61071561070d6107229336906004016105dc565b600435612f9e565b919091612e15565b612b92565b54156107765760207f1626ba7e000000000000000000000000000000000000000000000000000000005b7fffffffff0000000000000000000000000000000000000000000000000000000060405191168152f35b60207fffffffff0000000000000000000000000000000000000000000000000000000061074c565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6004358181116102cf576107ef9036906004016105dc565b906024359081116102cf576108089036906004016105dc565b815191826000937a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015610a7c575b506d04ee2d6d415b85acef810000000080831015610a6d575b50662386f26fc1000080831015610a5e575b506305f5e10080831015610a4f575b5061271080831015610a40575b506064821015610a30575b600a80921015610a26575b6001908160216108a2828901611f17565b97880101905b6109c5575b505050509061093b9261090261092e610936946040519283916108fc60208401966108fc88601a907f19457468657265756d205369676e6564204d6573736167653a0a00000000000081520190565b90613089565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610552565b519020612dc6565b61307c565b1561099c576109987f20c13b0b000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681529081906020820190565b0390f35b6109987fffffffff00000000000000000000000000000000000000000000000000000000610965565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff849101917f30313233343536373839616263646566000000000000000000000000000000008282061a835304918215610a21579190826108a8565b6108ad565b9360010193610891565b9390606460029104910193610886565b6004919592049101933861087b565b6008919592049101933861086e565b6010919592049101933861085f565b6020919592049101933861084d565b604095508104915038610834565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435610ac6816103cd565b60243567ffffffffffffffff81116102cf57610ae69036906004016103eb565b610af292919233612b92565b541561049f5761001992610b07913691613268565b906137ae565b60807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102cf57600435610b43816103cd565b91602435916044359067ffffffffffffffff82116102cf57610b67916004016105dc565b9060643560028110156102cf5790565b50346102cf576020610b94610b8b36610b0d565b9291909161391d565b6040519015158152f35b60005b838110610bb15750506000910152565b8181015183820152602001610ba1565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610bfd81518092818752878088019101610b9e565b0116010190565b50346102cf57610c16610b8b36610b0d565b6040519060203d8301016040523d82523d6000602084013e61099860405192839215158352604060208401526040830190610bc1565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126102cf57600435610c83816103cd565b916024359067ffffffffffffffff82116102cf57610ca3916004016103eb565b9091565b50346102cf57610cb636610c4c565b610cc292919233612b92565b541561049f5761001992610cd791369161120a565b906135de565b801515036102cf57565b50346102cf5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435602435610d26816103cd565b60443590610d3382610cdd565b610d3c33612b92565b541561049f5773ffffffffffffffffffffffffffffffffffffffff81168015610dd9577f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b84149081610dcf575b5080610dc7575b610d9d5761001992612d6a565b60046040517f337b9b30000000000000000000000000000000000000000000000000000000008152fd5b508115610d90565b9050331438610d89565b60046040517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576020610e4c602435610e44816103cd565b600435612c3e565b546040519015158152f35b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6004358181116102cf57610ea89036906004016103eb565b90916024359081116102cf57610ec29036906004016103eb565b90610ecc33612b92565b541561049f57828203610f185760005b838110610ee557005b80610f12610ef6600193878961194f565b35610f00816103cd565b610f0b83878761194f565b359061338d565b01610edc565b60046040517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b602080820190808352835180925260408301928160408460051b8301019501936000915b848310610f765750505050505090565b9091929394958480610fb2837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a51610bc1565b9801930193019194939290610f66565b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6024358181116102cf5761100e9036906004016103eb565b90916044359081116102cf576110289036906004016103eb565b92909161103433612beb565b541561049f5761104c611052936109989536916118af565b91611ae4565b60405191829182610f42565b50346102cf5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760043561109a816103cd565b67ffffffffffffffff906024358281116102cf576110bc9036906004016103eb565b926044359081116102cf576110d59036906004016103eb565b91906110e033612b92565b541561049f576110f86111009261001996369161120a565b92369161120a565b916136d0565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8152f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435611197816103cd565b60443567ffffffffffffffff81116102cf576111b79036906004016105dc565b6111c033612beb565b541561049f5760008160209384839451920190602435905af16040519015158152f35b60209067ffffffffffffffff81116111fd575b60051b0190565b6112056104c9565b6111f6565b9291611215826111e3565b916112236040519384610552565b829481845260208094019160051b81019283116102cf57905b8282106112495750505050565b8135815290830190830161123c565b9080601f830112156102cf578160206112739335910161120a565b90565b50346102cf5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576112b16004356103cd565b6112bc6024356103cd565b67ffffffffffffffff6044358181116102cf576112dd903690600401611258565b506064358181116102cf576112f6903690600401611258565b506084359081116102cf5761130f9036906004016105dc565b506040517fbc197c81000000000000000000000000000000000000000000000000000000008152602090f35b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102cf576004359067ffffffffffffffff82116102cf57610ca3916004016103eb565b50346102cf576113933661133b565b9061139d33612b92565b541561049f576113ab61309c565b5060005b8281106113b857005b6113cb6113c68285856130e1565b61313c565b908151916113d8836131d0565b6113e1836131d0565b8261142f576060015180519092507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610f1857611429611423600193611967565b51613347565b016113af565b611438836131d0565b6001928084036114a85750606081015192835103610f185760019261149c61149661147d60206114a395015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b91611967565b519061338d565b611429565b600193506114b5816131d0565b600281036114f05750806114eb61147d602060406114a395015193015173ffffffffffffffffffffffffffffffffffffffff1690565b6135de565b806114fc6003926131d0565b14611508575b50611429565b80604061153f92015161153a61147d6020606085015194015173ffffffffffffffffffffffffffffffffffffffff1690565b6136d0565b38611502565b50346102cf576115543661133b565b9061155e33612b92565b541561049f5761156c6131da565b5060005b82811061157957005b61158c61158782858561321a565b6132c0565b90815191611599836131d0565b6115a2836131d0565b6001928084036115e657508060406115d761147d60206115e095015173ffffffffffffffffffffffffffffffffffffffff1690565b910151906137ae565b01611570565b6115ef816131d0565b60028103611630575080604061162261147d602061162b95015173ffffffffffffffffffffffffffffffffffffffff1690565b91015190613853565b6115e0565b8061163c6003926131d0565b14611648575b506115e0565b80604061162261147d602061167295015173ffffffffffffffffffffffffffffffffffffffff1690565b38611642565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8152f35b50346102cf5761047836610c4c565b50346102cf5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5761171a33612b92565b541561049f57610019600435613347565b50346102cf5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576117666004356103cd565b6117716024356103cd565b60843567ffffffffffffffff81116102cf576117919036906004016105dc565b5060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b5060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576004356117f3816103cd565b67ffffffffffffffff6064358181116102cf576118149036906004016103eb565b90916084359081116102cf5761182e9036906004016103eb565b90937f8ace5aef1887be9219d1b04dbcfb5676ed5a12ec4a1129de5781d4d7ea71c9ed9081546118855761186f91602435905561186a81612c72565b612cee565b8161187657005b6100199361104c9136916118af565b60046040517fef34ca5c000000000000000000000000000000000000000000000000000000008152fd5b929190926118bc846111e3565b916118ca6040519384610552565b829480845260208094019060051b8301928284116102cf5780915b8483106118f457505050505050565b823567ffffffffffffffff81116102cf57869161191486849386016105dc565b8152019201916118e5565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561195f5760051b0190565b61120561191f565b602090805115611975570190565b61197d61191f565b0190565b6020918151811015611996575b60051b010190565b61199e61191f565b61198e565b156119aa57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f56616c7565206d757374206265203332206279746573000000000000000000006044820152fd5b602081519101519060208110611a1c575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060200360031b1b1690565b3d15611a74573d90611a5a82610593565b91611a686040519384610552565b82523d6000602084013e565b606090565b60405190611a868261051a565b600782527f556e6b6e6f776e000000000000000000000000000000000000000000000000006020830152565b73ffffffffffffffffffffffffffffffffffffffff611273949360609383521660208201528160408201520190610bc1565b9060005b818110611af55750505090565b611b0081838561194f565b6040903560d881901c828116159384611ea55760010193611b2285878961194f565b3560205b600384811660018103611cfb5750600092839260209250868316611ce357611b71917fffffffff0000000000000000000000000000000000000000000000000000000089168e611f66565b905b815191018273ffffffffffffffffffffffffffffffffffffffff88165af193611b9a611a49565b94915b859215611c225750505060801615611be857600192917fff00000000000000000000000000000000000000000000000000000000000000611be29260581b1687612a4b565b01611ae8565b90600192957fff00000000000000000000000000000000000000000000000000000000000000611c1c9360581b1690612982565b93611be2565b611c929350869073ffffffffffffffffffffffffffffffffffffffff96611c47611a79565b9460449182815111611ca5575b505050600014611c9657905b519485947fef3dcb2f000000000000000000000000000000000000000000000000000000008652169060048501611ab2565b0390fd5b611c9f9061030f565b90611c60565b6020611cbc6004611cb584612ad0565b9301611a08565b03611c5457611ccd60248301611a08565b14611cd9575b80611c54565b0193508780611cd3565b50607f611cf49160f81c168c611981565b5190611b73565b60028103611d885750600092839260209250868316611d7057611d41917fffffffff0000000000000000000000000000000000000000000000000000000089168e611f66565b905b8151910173ffffffffffffffffffffffffffffffffffffffff87165afa93611d69611a49565b9491611b9d565b50607f611d819160f81c168c611981565b5190611d43565b03611e47576000918291607f90611da58d838560f81c1690611981565b51928d611dbf602095611dba878251146119a3565b611a08565b93858a16158714611e2e5750611dd7611e059361030f565b9160081b907fffffffff000000000000000000000000000000000000000000000000000000008b1690611f66565b915b825192019073ffffffffffffffffffffffffffffffffffffffff88165af193611d69611a49565b919050611e40925060f01c168d611981565b5191611e07565b85517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c69642063616c6c74797065000000000000000000000000000000006044820152606490fd5b9379ffffffffffffffffffffffffffffffffffffffffffffffffffff8360281b176006611b26565b60405190610160820182811067ffffffffffffffff821117611efc575b604052600a8252610140366020840137565b611f046104c9565b611eea565b906004820180921161033c57565b90611f2182610593565b611f2e6040519182610552565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611f5c8294610593565b0190602036910137565b600094939285918290611f77611ecd565b9760609281905b8882106120f0575b5050611f94611f9991611f09565b611f17565b97602095868a015260009060248a019482965b898810611fbf5750505050505050505050565b8890818910156120e3575b8c838a1a60808116156120c45760fe81036120365750816120267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092600195948c5261201583611f09565b61201f8c51610346565b918c612abe565b88510101975b0197019695611fac565b929895919260fd81036120645750916001999185858961205896858b52612591565b5098919790979461202c565b60fc81036120815750916001999185858961205896858b526125e4565b926120bd8782936120ac8b6120a09b9e979b607f60019a168092611981565b5151968794528c611981565b51906120b785611f09565b91612aac565b019761202c565b8392999150926120d9607f6001951689611981565b510151815261202c565b6120eb61191f565b611fca565b90949591602090818710156121a1575b87871a60ff811461218b5760808116156121775760fe81036121595750855115612138575b90600191865101935b0196950190611f7e565b94506001906040516121508161090288858301610f42565b95909150612125565b9261216b9360019893959d8a88612250565b9691939093929b61212e565b6121859060019392876121ae565b9361212e565b509598509195949150611f949050611f99611f86565b6121a961191f565b612100565b6121bf90607f602093941690611981565b5151036121cc5760200190565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f537461746963207374617465207661726961626c6573206d757374206265203360448201527f32206279746573000000000000000000000000000000000000000000000000006064820152fd5b90969594939260fd810361227057509561226a959661233f565b90919293565b60fc810361228457509561226a959661246d565b919650919493929161229991607f1690611981565b515180151580612334575b156122b0570160200191565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f44796e616d6963207374617465207661726961626c6573206d7573742062652060448201527f61206d756c7469706c65206f66203332206279746573000000000000000000006064820152fd5b50601f8116156122a4565b92919093946001019360208510156123d5575b6020612363607f83881a1686611981565b51510361237757602061226a96019361246d565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4172726179206c656e677468206d7573742062652033322062797465730000006044820152fd5b6123dd61191f565b612352565b156123e957565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f43616e6e6f74207573652073746174652066726f6d20696e736964652064796e60448201527f616d6963207479706500000000000000000000000000000000000000000000006064820152fd5b6001808501976020968701978201969095600094909392915b808910612511576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f44796e616d6963207479706520776173206e6f742070726f7065726c7920636c60448201527f6f736564000000000000000000000000000000000000000000000000000000006064820152608490fd5b81891a60808116156125775760fb810361253b5750505050506125349083611981565b5293929190565b99849b8b83989985879e9861255a61255f989f97999a60fe14156123e2565b612250565b9b929b9a919a96909a9b975b01950197909291612486565b9061258b8495939a979b92829593856121ae565b9a61256b565b93929190602060016125c9980196818810156125d7575b816125b8607f868b1a1685611981565b5101516024828901015201946125e4565b929391929091602090910190565b6125df61191f565b6125a8565b9395969290916000946125f78884611981565b51936024600180878b019b019b0198830101915b602094858a101561272d57848a1a60808116156127075760fb8103612634575050505050505050565b9b8c60fd889d939598979c94969b999e1460001461267f57509061265f92918d8b52848c8988612591565b929c919b978301909501989101956001915b01930197929193909361260b565b9091929394955060fc81146000146126bd5750916126a7918b9594938d8b52848c89886125e4565b929c919b97830190950198910195600191612671565b9a89878e83949f9e956126fb607f6001989b9a999b16946126f06126e18787611981565b51519687968796879452611981565b518b6120b785611f09565b019d0198010198612671565b95600192949981612721607f8295979a9e999e168a611981565b5101518b520198612671565b50505050505050565b1561273d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e646578206f75742d6f662d626f756e6473000000000000000000000000006044820152fd5b156127a257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4f6e6c79206f6e652072657475726e2076616c7565207065726d69747465642060448201527f28737461746963290000000000000000000000000000000000000000000000006064820152fd5b1561282d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4f6e6c79206f6e652072657475726e2076616c7565207065726d69747465642060448201527f287661726961626c6529000000000000000000000000000000000000000000006064820152fd5b60209081818403126102cf57805167ffffffffffffffff918282116102cf57019083601f830112156102cf5781516128e8816111e3565b946040926128f884519788610552565b828752858088019360051b860101948286116102cf57868101935b86851061292557505050505050505090565b84518381116102cf5782019084603f830112156102cf57888201519061294a82610593565b61295689519182610552565b828152868984860101116102cf576129778b949385948b8685019101610b9e565b815201940193612913565b91908060f81c60ff8114612a45576080811615612a0d5760fe81036129b75750506112739150602080825183010191016128b1565b6020916129cd610fe092607f8751911610612736565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838501946129fe85875114612826565b5101845260f31c168301015290565b612a41929150607f1690612a2384518310612736565b612a30602082511461279b565b612a3a8285611981565b5282611981565b5090565b50505090565b9060f81c9060ff8214612aa757602091612a8891607f612a758651868101809111612a9f57611f17565b921691612a828383611981565b52611981565b51918051604084018184840160045afa5051910152565b611f946102df565b505050565b916020809185930101920160045afa50565b910160200190829060400160045afa50565b9081517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc808201828111612b85575b9360445b838110612b11575b50505050565b8151811015612b78575b7fff00000000000000000000000000000000000000000000000000000000000000602082840101511615612b5157600101612b03565b9394505090508101908111612b6b575b9038808080612b0b565b612b736102df565b612b61565b612b8061191f565b612b1b565b612b8d6102df565b612aff565b60405173ffffffffffffffffffffffffffffffffffffffff60208201927f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b845216604082015260408152612be581610536565b51902090565b60405173ffffffffffffffffffffffffffffffffffffffff60208201927fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f845216604082015260408152612be581610536565b9073ffffffffffffffffffffffffffffffffffffffff604051916020830193845216604082015260408152612be581610536565b60607ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a41916001612ca182612b92565b5573ffffffffffffffffffffffffffffffffffffffff604051917f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b835216602082015260016040820152a1565b60607ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a41916001612d1d82612beb565b5573ffffffffffffffffffffffffffffffffffffffff604051917fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f835216602082015260016040820152a1565b7ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a419273ffffffffffffffffffffffffffffffffffffffff60609382612daf8286612c3e565b5560405193845216602083015215156040820152a1565b6112739161071591612f9e565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60051115612e0d57565b610344612dd3565b612e1e81612e03565b80612e265750565b612e2f81612e03565b60018103612e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b612e9f81612e03565b60028103612f06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b80612f12600392612e03565b14612f1957565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608490fd5b906041815114600014612fc857610ca3916020820151906060604084015193015160001a90612fdf565b5050600090600290565b506040513d6000823e3d90fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116130705791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15613063575b815173ffffffffffffffffffffffffffffffffffffffff81161561305d579190565b50600190565b61306b612fd2565b61303b565b50505050600090600390565b61308590612b92565b5490565b9061197d60209282815194859201610b9e565b604051906080820182811067ffffffffffffffff8211176130d4575b6040526060808360008152600060208201528160408201520152565b6130dc6104c9565b6130b8565b9190811015613122575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156102cf570190565b61312a61191f565b6130eb565b359060048210156102cf57565b6080813603126102cf576040519067ffffffffffffffff9060808301828111848210176131c3575b6040526131708161312f565b83526020810135613180816103cd565b602084015260408101358281116102cf5761319e9036908301611258565b604084015260608101359182116102cf576131bb91369101611258565b606082015290565b6131cb6104c9565b613164565b60041115612e0d57565b604051906060820182811067ffffffffffffffff82111761320d575b604052606060408360008152600060208201520152565b6132156104c9565b6131f6565b919081101561325b575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1813603018212156102cf570190565b61326361191f565b613224565b9291613273826111e3565b916132816040519384610552565b829481845260208094019160051b81019283116102cf57905b8282106132a75750505050565b83809183356132b5816103cd565b81520191019061329a565b6060813603126102cf576040519067ffffffffffffffff90606083018281118482101761333a575b6040526132f48161312f565b83526020810135613304816103cd565b602084015260408101359182116102cf570136601f820112156102cf57613332903690602081359101613268565b604082015290565b6133426104c9565b6132e8565b600080809260405190335af161335b611a49565b501561336357565b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b9061034491604051917fa9059cbb0000000000000000000000000000000000000000000000000000000060208401523360248401526044830152604482526080820182811067ffffffffffffffff8211176133eb575b6040526133f8565b6133f36104c9565b6133e3565b6040516134639173ffffffffffffffffffffffffffffffffffffffff1661341e8261051a565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161345d611a49565b91613512565b80518061346f57505050565b818391810103126102cf5781015161348681610cdd565b1561348e5750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b9192901561358d5750815115613526575090565b3b1561352f5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156135a05750805190602001fd5b611c92906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610bc1565b81519060005b8281106135f15750505050565b73ffffffffffffffffffffffffffffffffffffffff8216906136138186611981565b5191803b156102cf5760008091606460019560405194859384927f42842e0e00000000000000000000000000000000000000000000000000000000845230600485015233602485015260448401525af1801561368f575b613676575b50016135e4565b80613683613689926104f9565b806102d4565b3861366f565b613697612fd2565b61366a565b90815180825260208080930193019160005b8281106136bc575050505090565b8351855293810193928101926001016136ae565b73ffffffffffffffffffffffffffffffffffffffff1691823b156102cf5761377692600092836020613745948260405198899788967f2eb2c2d600000000000000000000000000000000000000000000000000000000885230600489015233602489015260a0604489015260a488019061369c565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc938488830301606489015261369c565b85810392830160848701525201925af180156137a1575b6137945750565b80613683610344926104f9565b6137a9612fd2565b61378d565b81519160005b8381106137c15750505050565b8061384d61090261384773ffffffffffffffffffffffffffffffffffffffff6137ec60019688611981565b51166040519283917f095ea7b300000000000000000000000000000000000000000000000000000000602084015260248301602060009193929373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b856133f8565b016137b4565b81519060005b8281106138665750505050565b73ffffffffffffffffffffffffffffffffffffffff908183169161388a8287611981565b5116823b156102cf576040517fa22cb46500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201526000602482018190526001938290604490829084905af18015613910575b613901575b5001613859565b61390a906104f9565b386138fa565b613918612fd2565b6138f5565b90604093845160208101907fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8252338782015286815261395c81610536565b5190205415613a065761396e81613a2f565b6139dd5791600092918392602083519301915af19081156139b3577f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb86000339251a290565b7facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd3756000339251a290565b600484517f7ddbd43b000000000000000000000000000000000000000000000000000000008152fd5b600485517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b60021115612e0d5756fea264697066735822122055c1e9d99b334c359a375b3e8deb296d79806faf677b905b37ffc3b209d182d364736f6c63430008100033", + "deployedBytecode": "0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806301ffc9a71461020f57806307bd0265146102065780630fe786e1146101fd578063150b7a02146101f45780631626ba7e146101eb57806320c13b0b146101e257806331b455a5146101d9578063468721a7146101d05780635229073f146101c757806356255c53146101be578063599e4c70146101b557806360d6c7cf146101ac5780638a2685a9146101a35780638fd8d1bb1461019a578063a4508b1f14610191578063a6b520c014610188578063b61d27f61461017f578063bc197c8114610176578063dedd65241461016d578063e1084a1314610164578063e58378bb1461015b578063e5cb370314610152578063f14210a614610149578063f23a6e61146101405763f4adeb750361000e5761013b6117bc565b61000e565b5061013b61172b565b5061013b6116e1565b5061013b6116d2565b5061013b611678565b5061013b611545565b5061013b611384565b5061013b611276565b5061013b611160565b5061013b611106565b5061013b61105e565b5061013b610fc2565b5061013b610e57565b5061013b610e03565b5061013b610ce7565b5061013b610ca7565b5061013b610c04565b5061013b610b77565b5061013b610a8a565b5061013b61079e565b5061013b6106b4565b5061013b610623565b5061013b61041c565b5061013b610373565b50346102cf5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036102cf57807f4e2312e000000000000000000000000000000000000000000000000000000000602092149081156102a5575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861029a565b600080fd5b60009103126102cf57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161033c57565b6103446102df565b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820191821161033c57565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f8152f35b73ffffffffffffffffffffffffffffffffffffffff8116036102cf57565b9181601f840112156102cf5782359167ffffffffffffffff83116102cf576020808501948460051b0101116102cf57565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435610458816103cd565b60243567ffffffffffffffff81116102cf576104789036906004016103eb565b61048492919233612b92565b541561049f5761001992610499913691613268565b90613853565b60046040517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161050d57604052565b6105156104c9565b604052565b6040810190811067ffffffffffffffff82111761050d57604052565b6060810190811067ffffffffffffffff82111761050d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761050d57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff81116105cf575b01160190565b6105d76104c9565b6105c9565b81601f820112156102cf578035906105f382610593565b926106016040519485610552565b828452602083830101116102cf57816000926020809301838601378301015290565b50346102cf5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5761065e6004356103cd565b6106696024356103cd565b60643567ffffffffffffffff81116102cf576106899036906004016105dc565b5060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760243567ffffffffffffffff81116102cf5761071d61071561070d6107229336906004016105dc565b600435612f9e565b919091612e15565b612b92565b54156107765760207f1626ba7e000000000000000000000000000000000000000000000000000000005b7fffffffff0000000000000000000000000000000000000000000000000000000060405191168152f35b60207fffffffff0000000000000000000000000000000000000000000000000000000061074c565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6004358181116102cf576107ef9036906004016105dc565b906024359081116102cf576108089036906004016105dc565b815191826000937a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015610a7c575b506d04ee2d6d415b85acef810000000080831015610a6d575b50662386f26fc1000080831015610a5e575b506305f5e10080831015610a4f575b5061271080831015610a40575b506064821015610a30575b600a80921015610a26575b6001908160216108a2828901611f17565b97880101905b6109c5575b505050509061093b9261090261092e610936946040519283916108fc60208401966108fc88601a907f19457468657265756d205369676e6564204d6573736167653a0a00000000000081520190565b90613089565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610552565b519020612dc6565b61307c565b1561099c576109987f20c13b0b000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681529081906020820190565b0390f35b6109987fffffffff00000000000000000000000000000000000000000000000000000000610965565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff849101917f30313233343536373839616263646566000000000000000000000000000000008282061a835304918215610a21579190826108a8565b6108ad565b9360010193610891565b9390606460029104910193610886565b6004919592049101933861087b565b6008919592049101933861086e565b6010919592049101933861085f565b6020919592049101933861084d565b604095508104915038610834565b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435610ac6816103cd565b60243567ffffffffffffffff81116102cf57610ae69036906004016103eb565b610af292919233612b92565b541561049f5761001992610b07913691613268565b906137ae565b60807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102cf57600435610b43816103cd565b91602435916044359067ffffffffffffffff82116102cf57610b67916004016105dc565b9060643560028110156102cf5790565b50346102cf576020610b94610b8b36610b0d565b9291909161391d565b6040519015158152f35b60005b838110610bb15750506000910152565b8181015183820152602001610ba1565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610bfd81518092818752878088019101610b9e565b0116010190565b50346102cf57610c16610b8b36610b0d565b6040519060203d8301016040523d82523d6000602084013e61099860405192839215158352604060208401526040830190610bc1565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126102cf57600435610c83816103cd565b916024359067ffffffffffffffff82116102cf57610ca3916004016103eb565b9091565b50346102cf57610cb636610c4c565b610cc292919233612b92565b541561049f5761001992610cd791369161120a565b906135de565b801515036102cf57565b50346102cf5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435602435610d26816103cd565b60443590610d3382610cdd565b610d3c33612b92565b541561049f5773ffffffffffffffffffffffffffffffffffffffff81168015610dd9577f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b84149081610dcf575b5080610dc7575b610d9d5761001992612d6a565b60046040517f337b9b30000000000000000000000000000000000000000000000000000000008152fd5b508115610d90565b9050331438610d89565b60046040517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576020610e4c602435610e44816103cd565b600435612c3e565b546040519015158152f35b50346102cf5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6004358181116102cf57610ea89036906004016103eb565b90916024359081116102cf57610ec29036906004016103eb565b90610ecc33612b92565b541561049f57828203610f185760005b838110610ee557005b80610f12610ef6600193878961194f565b35610f00816103cd565b610f0b83878761194f565b359061338d565b01610edc565b60046040517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b602080820190808352835180925260408301928160408460051b8301019501936000915b848310610f765750505050505090565b9091929394958480610fb2837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a51610bc1565b9801930193019194939290610f66565b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5767ffffffffffffffff6024358181116102cf5761100e9036906004016103eb565b90916044359081116102cf576110289036906004016103eb565b92909161103433612beb565b541561049f5761104c611052936109989536916118af565b91611ae4565b60405191829182610f42565b50346102cf5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760043561109a816103cd565b67ffffffffffffffff906024358281116102cf576110bc9036906004016103eb565b926044359081116102cf576110d59036906004016103eb565b91906110e033612b92565b541561049f576110f86111009261001996369161120a565b92369161120a565b916136d0565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8152f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf57600435611197816103cd565b60443567ffffffffffffffff81116102cf576111b79036906004016105dc565b6111c033612beb565b541561049f5760008160209384839451920190602435905af16040519015158152f35b60209067ffffffffffffffff81116111fd575b60051b0190565b6112056104c9565b6111f6565b9291611215826111e3565b916112236040519384610552565b829481845260208094019160051b81019283116102cf57905b8282106112495750505050565b8135815290830190830161123c565b9080601f830112156102cf578160206112739335910161120a565b90565b50346102cf5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576112b16004356103cd565b6112bc6024356103cd565b67ffffffffffffffff6044358181116102cf576112dd903690600401611258565b506064358181116102cf576112f6903690600401611258565b506084359081116102cf5761130f9036906004016105dc565b506040517fbc197c81000000000000000000000000000000000000000000000000000000008152602090f35b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102cf576004359067ffffffffffffffff82116102cf57610ca3916004016103eb565b50346102cf576113933661133b565b9061139d33612b92565b541561049f576113ab61309c565b5060005b8281106113b857005b6113cb6113c68285856130e1565b61313c565b908151916113d8836131d0565b6113e1836131d0565b8261142f576060015180519092507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610f1857611429611423600193611967565b51613347565b016113af565b611438836131d0565b6001928084036114a85750606081015192835103610f185760019261149c61149661147d60206114a395015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b91611967565b519061338d565b611429565b600193506114b5816131d0565b600281036114f05750806114eb61147d602060406114a395015193015173ffffffffffffffffffffffffffffffffffffffff1690565b6135de565b806114fc6003926131d0565b14611508575b50611429565b80604061153f92015161153a61147d6020606085015194015173ffffffffffffffffffffffffffffffffffffffff1690565b6136d0565b38611502565b50346102cf576115543661133b565b9061155e33612b92565b541561049f5761156c6131da565b5060005b82811061157957005b61158c61158782858561321a565b6132c0565b90815191611599836131d0565b6115a2836131d0565b6001928084036115e657508060406115d761147d60206115e095015173ffffffffffffffffffffffffffffffffffffffff1690565b910151906137ae565b01611570565b6115ef816131d0565b60028103611630575080604061162261147d602061162b95015173ffffffffffffffffffffffffffffffffffffffff1690565b91015190613853565b6115e0565b8061163c6003926131d0565b14611648575b506115e0565b80604061162261147d602061167295015173ffffffffffffffffffffffffffffffffffffffff1690565b38611642565b50346102cf5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5760206040517f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8152f35b50346102cf5761047836610c4c565b50346102cf5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf5761171a33612b92565b541561049f57610019600435613347565b50346102cf5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576117666004356103cd565b6117716024356103cd565b60843567ffffffffffffffff81116102cf576117919036906004016105dc565b5060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b5060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cf576004356117f3816103cd565b67ffffffffffffffff6064358181116102cf576118149036906004016103eb565b90916084359081116102cf5761182e9036906004016103eb565b90937f8ace5aef1887be9219d1b04dbcfb5676ed5a12ec4a1129de5781d4d7ea71c9ed9081546118855761186f91602435905561186a81612c72565b612cee565b8161187657005b6100199361104c9136916118af565b60046040517fef34ca5c000000000000000000000000000000000000000000000000000000008152fd5b929190926118bc846111e3565b916118ca6040519384610552565b829480845260208094019060051b8301928284116102cf5780915b8483106118f457505050505050565b823567ffffffffffffffff81116102cf57869161191486849386016105dc565b8152019201916118e5565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561195f5760051b0190565b61120561191f565b602090805115611975570190565b61197d61191f565b0190565b6020918151811015611996575b60051b010190565b61199e61191f565b61198e565b156119aa57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f56616c7565206d757374206265203332206279746573000000000000000000006044820152fd5b602081519101519060208110611a1c575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060200360031b1b1690565b3d15611a74573d90611a5a82610593565b91611a686040519384610552565b82523d6000602084013e565b606090565b60405190611a868261051a565b600782527f556e6b6e6f776e000000000000000000000000000000000000000000000000006020830152565b73ffffffffffffffffffffffffffffffffffffffff611273949360609383521660208201528160408201520190610bc1565b9060005b818110611af55750505090565b611b0081838561194f565b6040903560d881901c828116159384611ea55760010193611b2285878961194f565b3560205b600384811660018103611cfb5750600092839260209250868316611ce357611b71917fffffffff0000000000000000000000000000000000000000000000000000000089168e611f66565b905b815191018273ffffffffffffffffffffffffffffffffffffffff88165af193611b9a611a49565b94915b859215611c225750505060801615611be857600192917fff00000000000000000000000000000000000000000000000000000000000000611be29260581b1687612a4b565b01611ae8565b90600192957fff00000000000000000000000000000000000000000000000000000000000000611c1c9360581b1690612982565b93611be2565b611c929350869073ffffffffffffffffffffffffffffffffffffffff96611c47611a79565b9460449182815111611ca5575b505050600014611c9657905b519485947fef3dcb2f000000000000000000000000000000000000000000000000000000008652169060048501611ab2565b0390fd5b611c9f9061030f565b90611c60565b6020611cbc6004611cb584612ad0565b9301611a08565b03611c5457611ccd60248301611a08565b14611cd9575b80611c54565b0193508780611cd3565b50607f611cf49160f81c168c611981565b5190611b73565b60028103611d885750600092839260209250868316611d7057611d41917fffffffff0000000000000000000000000000000000000000000000000000000089168e611f66565b905b8151910173ffffffffffffffffffffffffffffffffffffffff87165afa93611d69611a49565b9491611b9d565b50607f611d819160f81c168c611981565b5190611d43565b03611e47576000918291607f90611da58d838560f81c1690611981565b51928d611dbf602095611dba878251146119a3565b611a08565b93858a16158714611e2e5750611dd7611e059361030f565b9160081b907fffffffff000000000000000000000000000000000000000000000000000000008b1690611f66565b915b825192019073ffffffffffffffffffffffffffffffffffffffff88165af193611d69611a49565b919050611e40925060f01c168d611981565b5191611e07565b85517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c69642063616c6c74797065000000000000000000000000000000006044820152606490fd5b9379ffffffffffffffffffffffffffffffffffffffffffffffffffff8360281b176006611b26565b60405190610160820182811067ffffffffffffffff821117611efc575b604052600a8252610140366020840137565b611f046104c9565b611eea565b906004820180921161033c57565b90611f2182610593565b611f2e6040519182610552565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611f5c8294610593565b0190602036910137565b600094939285918290611f77611ecd565b9760609281905b8882106120f0575b5050611f94611f9991611f09565b611f17565b97602095868a015260009060248a019482965b898810611fbf5750505050505050505050565b8890818910156120e3575b8c838a1a60808116156120c45760fe81036120365750816120267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092600195948c5261201583611f09565b61201f8c51610346565b918c612abe565b88510101975b0197019695611fac565b929895919260fd81036120645750916001999185858961205896858b52612591565b5098919790979461202c565b60fc81036120815750916001999185858961205896858b526125e4565b926120bd8782936120ac8b6120a09b9e979b607f60019a168092611981565b5151968794528c611981565b51906120b785611f09565b91612aac565b019761202c565b8392999150926120d9607f6001951689611981565b510151815261202c565b6120eb61191f565b611fca565b90949591602090818710156121a1575b87871a60ff811461218b5760808116156121775760fe81036121595750855115612138575b90600191865101935b0196950190611f7e565b94506001906040516121508161090288858301610f42565b95909150612125565b9261216b9360019893959d8a88612250565b9691939093929b61212e565b6121859060019392876121ae565b9361212e565b509598509195949150611f949050611f99611f86565b6121a961191f565b612100565b6121bf90607f602093941690611981565b5151036121cc5760200190565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f537461746963207374617465207661726961626c6573206d757374206265203360448201527f32206279746573000000000000000000000000000000000000000000000000006064820152fd5b90969594939260fd810361227057509561226a959661233f565b90919293565b60fc810361228457509561226a959661246d565b919650919493929161229991607f1690611981565b515180151580612334575b156122b0570160200191565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f44796e616d6963207374617465207661726961626c6573206d7573742062652060448201527f61206d756c7469706c65206f66203332206279746573000000000000000000006064820152fd5b50601f8116156122a4565b92919093946001019360208510156123d5575b6020612363607f83881a1686611981565b51510361237757602061226a96019361246d565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4172726179206c656e677468206d7573742062652033322062797465730000006044820152fd5b6123dd61191f565b612352565b156123e957565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f43616e6e6f74207573652073746174652066726f6d20696e736964652064796e60448201527f616d6963207479706500000000000000000000000000000000000000000000006064820152fd5b6001808501976020968701978201969095600094909392915b808910612511576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f44796e616d6963207479706520776173206e6f742070726f7065726c7920636c60448201527f6f736564000000000000000000000000000000000000000000000000000000006064820152608490fd5b81891a60808116156125775760fb810361253b5750505050506125349083611981565b5293929190565b99849b8b83989985879e9861255a61255f989f97999a60fe14156123e2565b612250565b9b929b9a919a96909a9b975b01950197909291612486565b9061258b8495939a979b92829593856121ae565b9a61256b565b93929190602060016125c9980196818810156125d7575b816125b8607f868b1a1685611981565b5101516024828901015201946125e4565b929391929091602090910190565b6125df61191f565b6125a8565b9395969290916000946125f78884611981565b51936024600180878b019b019b0198830101915b602094858a101561272d57848a1a60808116156127075760fb8103612634575050505050505050565b9b8c60fd889d939598979c94969b999e1460001461267f57509061265f92918d8b52848c8988612591565b929c919b978301909501989101956001915b01930197929193909361260b565b9091929394955060fc81146000146126bd5750916126a7918b9594938d8b52848c89886125e4565b929c919b97830190950198910195600191612671565b9a89878e83949f9e956126fb607f6001989b9a999b16946126f06126e18787611981565b51519687968796879452611981565b518b6120b785611f09565b019d0198010198612671565b95600192949981612721607f8295979a9e999e168a611981565b5101518b520198612671565b50505050505050565b1561273d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e646578206f75742d6f662d626f756e6473000000000000000000000000006044820152fd5b156127a257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4f6e6c79206f6e652072657475726e2076616c7565207065726d69747465642060448201527f28737461746963290000000000000000000000000000000000000000000000006064820152fd5b1561282d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4f6e6c79206f6e652072657475726e2076616c7565207065726d69747465642060448201527f287661726961626c6529000000000000000000000000000000000000000000006064820152fd5b60209081818403126102cf57805167ffffffffffffffff918282116102cf57019083601f830112156102cf5781516128e8816111e3565b946040926128f884519788610552565b828752858088019360051b860101948286116102cf57868101935b86851061292557505050505050505090565b84518381116102cf5782019084603f830112156102cf57888201519061294a82610593565b61295689519182610552565b828152868984860101116102cf576129778b949385948b8685019101610b9e565b815201940193612913565b91908060f81c60ff8114612a45576080811615612a0d5760fe81036129b75750506112739150602080825183010191016128b1565b6020916129cd610fe092607f8751911610612736565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838501946129fe85875114612826565b5101845260f31c168301015290565b612a41929150607f1690612a2384518310612736565b612a30602082511461279b565b612a3a8285611981565b5282611981565b5090565b50505090565b9060f81c9060ff8214612aa757602091612a8891607f612a758651868101809111612a9f57611f17565b921691612a828383611981565b52611981565b51918051604084018184840160045afa5051910152565b611f946102df565b505050565b916020809185930101920160045afa50565b910160200190829060400160045afa50565b9081517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc808201828111612b85575b9360445b838110612b11575b50505050565b8151811015612b78575b7fff00000000000000000000000000000000000000000000000000000000000000602082840101511615612b5157600101612b03565b9394505090508101908111612b6b575b9038808080612b0b565b612b736102df565b612b61565b612b8061191f565b612b1b565b612b8d6102df565b612aff565b60405173ffffffffffffffffffffffffffffffffffffffff60208201927f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b845216604082015260408152612be581610536565b51902090565b60405173ffffffffffffffffffffffffffffffffffffffff60208201927fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f845216604082015260408152612be581610536565b9073ffffffffffffffffffffffffffffffffffffffff604051916020830193845216604082015260408152612be581610536565b60607ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a41916001612ca182612b92565b5573ffffffffffffffffffffffffffffffffffffffff604051917f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b835216602082015260016040820152a1565b60607ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a41916001612d1d82612beb565b5573ffffffffffffffffffffffffffffffffffffffff604051917fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f835216602082015260016040820152a1565b7ff7682c7604ab581823c6ee4b22f8283179771e57c8115328f4a698be07430a419273ffffffffffffffffffffffffffffffffffffffff60609382612daf8286612c3e565b5560405193845216602083015215156040820152a1565b6112739161071591612f9e565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60051115612e0d57565b610344612dd3565b612e1e81612e03565b80612e265750565b612e2f81612e03565b60018103612e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b612e9f81612e03565b60028103612f06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b80612f12600392612e03565b14612f1957565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608490fd5b906041815114600014612fc857610ca3916020820151906060604084015193015160001a90612fdf565b5050600090600290565b506040513d6000823e3d90fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116130705791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15613063575b815173ffffffffffffffffffffffffffffffffffffffff81161561305d579190565b50600190565b61306b612fd2565b61303b565b50505050600090600390565b61308590612b92565b5490565b9061197d60209282815194859201610b9e565b604051906080820182811067ffffffffffffffff8211176130d4575b6040526060808360008152600060208201528160408201520152565b6130dc6104c9565b6130b8565b9190811015613122575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156102cf570190565b61312a61191f565b6130eb565b359060048210156102cf57565b6080813603126102cf576040519067ffffffffffffffff9060808301828111848210176131c3575b6040526131708161312f565b83526020810135613180816103cd565b602084015260408101358281116102cf5761319e9036908301611258565b604084015260608101359182116102cf576131bb91369101611258565b606082015290565b6131cb6104c9565b613164565b60041115612e0d57565b604051906060820182811067ffffffffffffffff82111761320d575b604052606060408360008152600060208201520152565b6132156104c9565b6131f6565b919081101561325b575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1813603018212156102cf570190565b61326361191f565b613224565b9291613273826111e3565b916132816040519384610552565b829481845260208094019160051b81019283116102cf57905b8282106132a75750505050565b83809183356132b5816103cd565b81520191019061329a565b6060813603126102cf576040519067ffffffffffffffff90606083018281118482101761333a575b6040526132f48161312f565b83526020810135613304816103cd565b602084015260408101359182116102cf570136601f820112156102cf57613332903690602081359101613268565b604082015290565b6133426104c9565b6132e8565b600080809260405190335af161335b611a49565b501561336357565b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b9061034491604051917fa9059cbb0000000000000000000000000000000000000000000000000000000060208401523360248401526044830152604482526080820182811067ffffffffffffffff8211176133eb575b6040526133f8565b6133f36104c9565b6133e3565b6040516134639173ffffffffffffffffffffffffffffffffffffffff1661341e8261051a565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161345d611a49565b91613512565b80518061346f57505050565b818391810103126102cf5781015161348681610cdd565b1561348e5750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b9192901561358d5750815115613526575090565b3b1561352f5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156135a05750805190602001fd5b611c92906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610bc1565b81519060005b8281106135f15750505050565b73ffffffffffffffffffffffffffffffffffffffff8216906136138186611981565b5191803b156102cf5760008091606460019560405194859384927f42842e0e00000000000000000000000000000000000000000000000000000000845230600485015233602485015260448401525af1801561368f575b613676575b50016135e4565b80613683613689926104f9565b806102d4565b3861366f565b613697612fd2565b61366a565b90815180825260208080930193019160005b8281106136bc575050505090565b8351855293810193928101926001016136ae565b73ffffffffffffffffffffffffffffffffffffffff1691823b156102cf5761377692600092836020613745948260405198899788967f2eb2c2d600000000000000000000000000000000000000000000000000000000885230600489015233602489015260a0604489015260a488019061369c565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc938488830301606489015261369c565b85810392830160848701525201925af180156137a1575b6137945750565b80613683610344926104f9565b6137a9612fd2565b61378d565b81519160005b8381106137c15750505050565b8061384d61090261384773ffffffffffffffffffffffffffffffffffffffff6137ec60019688611981565b51166040519283917f095ea7b300000000000000000000000000000000000000000000000000000000602084015260248301602060009193929373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b856133f8565b016137b4565b81519060005b8281106138665750505050565b73ffffffffffffffffffffffffffffffffffffffff908183169161388a8287611981565b5116823b156102cf576040517fa22cb46500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201526000602482018190526001938290604490829084905af18015613910575b613901575b5001613859565b61390a906104f9565b386138fa565b613918612fd2565b6138f5565b90604093845160208101907fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8252338782015286815261395c81610536565b5190205415613a065761396e81613a2f565b6139dd5791600092918392602083519301915af19081156139b3577f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb86000339251a290565b7facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd3756000339251a290565b600484517f7ddbd43b000000000000000000000000000000000000000000000000000000008152fd5b600485517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b60021115612e0d5756fea264697066735822122055c1e9d99b334c359a375b3e8deb296d79806faf677b905b37ffc3b209d182d364736f6c63430008100033", + "devdoc": { + "kind": "dev", + "methods": { + "execTransactionFromModule(address,uint256,bytes,uint8)": { + "details": "Allows a Module to execute a Safe transaction without any further confirmations.", + "params": { + "data": "Data payload of module transaction.", + "operation": "Operation type of module transaction.", + "to": "Destination address of module transaction.", + "value": "Ether value of module transaction." + } + }, + "execTransactionFromModuleReturnData(address,uint256,bytes,uint8)": { + "details": "Allows a Module to execute a Safe transaction without any further confirmations and return data", + "params": { + "data": "Data payload of module transaction.", + "operation": "Operation type of module transaction.", + "to": "Destination address of module transaction.", + "value": "Ether value of module transaction." + } + }, + "onERC721Received(address,address,uint256,bytes)": { + "details": "See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/EnsoWalletFactory.json b/deployments/linea/EnsoWalletFactory.json new file mode 100644 index 0000000..b46f3c6 --- /dev/null +++ b/deployments/linea/EnsoWalletFactory.json @@ -0,0 +1,419 @@ +{ + "address": "0x66fc62c1748E45435b06cF8dD105B73E9855F93E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "ensoBeacon_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAccount", + "type": "error" + }, + { + "inputs": [], + "name": "NoLabel", + "type": "error" + }, + { + "inputs": [], + "name": "NotOwner", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "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": false, + "internalType": "contract IEnsoWallet", + "name": "instance", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "deployer", + "type": "address" + } + ], + "name": "Deployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "contract IEnsoWallet", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "shortcutId", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "commands", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "state", + "type": "bytes[]" + } + ], + "name": "deployCustom", + "outputs": [ + { + "internalType": "contract IEnsoWallet", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ensoBeacon", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "getCustomAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "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" + } + ], + "transactionHash": "0xb5bd4e2f3b238e0110007190a823bff2556fb6955502b4b2cf096d0458f2d004", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x826e0BB2276271eFdF2a500597f37b94f6c153bA", + "contractAddress": null, + "transactionIndex": 6, + "gasUsed": "1576164", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xad14f282e733695f8bbc2a0aa414670b56f8668d2ac78e6ba46c46912f54217c", + "transactionHash": "0xb5bd4e2f3b238e0110007190a823bff2556fb6955502b4b2cf096d0458f2d004", + "logs": [], + "blockNumber": 1195805, + "cumulativeGasUsed": "2086760", + "status": 1, + "byzantium": true + }, + "args": [ + "0x277D98D33b7F44921d4230697DeF8d1D56aBAa62" + ], + "numDeployments": 1, + "solcInputHash": "6e9a09176756a7e15ef5f84545755d11", + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ensoBeacon_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoLabel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPermitted\",\"type\":\"error\"},{\"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\":false,\"internalType\":\"contract IEnsoWallet\",\"name\":\"instance\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"Deployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"shortcutId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"commands\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"state\",\"type\":\"bytes[]\"}],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"contract IEnsoWallet\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"shortcutId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"commands\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"state\",\"type\":\"bytes[]\"}],\"name\":\"deployCustom\",\"outputs\":[{\"internalType\":\"contract IEnsoWallet\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ensoBeacon\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"}],\"name\":\"getCustomAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getUserAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/EnsoWalletFactory.sol\":\"EnsoWalletFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../ERC1967/ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\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. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n}\\n\",\"keccak256\":\"0x85cc5aca68692044586dc5ca19a9868d3288f6b35d1085c620dd0278ed0abdaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"contracts/EnsoWalletFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"./libraries/BeaconClones.sol\\\";\\nimport \\\"./access/Ownable.sol\\\";\\nimport \\\"./interfaces/IEnsoWallet.sol\\\";\\n\\ncontract EnsoWalletFactory is Ownable, UUPSUpgradeable {\\n using StorageAPI for bytes32;\\n using BeaconClones for address;\\n\\n address public immutable ensoBeacon;\\n\\n event Deployed(IEnsoWallet instance, string label, address deployer);\\n\\n error AlreadyInit();\\n error NoLabel();\\n\\n constructor(address ensoBeacon_) {\\n ensoBeacon = ensoBeacon_;\\n // Set owner to 0xff so that the implementation cannot be initialized\\n OWNER.setAddress(address(type(uint160).max));\\n }\\n\\n // @notice A function to initialize state on the proxy the delegates to this contract\\n // @param newOwner The new owner of this contract\\n function initialize(address newOwner) external {\\n if (newOwner == address(0)) revert InvalidAccount();\\n if (OWNER.getAddress() != address(0)) revert AlreadyInit();\\n OWNER.setAddress(newOwner);\\n }\\n\\n // @notice Deploy a wallet using the msg.sender as the salt\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function deploy(\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) public payable returns (IEnsoWallet) {\\n bytes32 salt = bytes32(uint256(uint160(msg.sender)));\\n return _deploy(salt, \\\"\\\", shortcutId, commands, state);\\n }\\n\\n // @notice Deploy a wallet using a hash of the msg.sender and a label as the salt\\n // @param label The label to identify deployment\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function deployCustom(\\n string memory label,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) public payable returns (IEnsoWallet) {\\n if (bytes(label).length == 0) revert NoLabel();\\n bytes32 salt = _customSalt(msg.sender, label);\\n return _deploy(salt, label, shortcutId, commands, state);\\n }\\n\\n // @notice Get the deployment address for the msg.sender\\n function getAddress() public view returns (address payable) {\\n return getUserAddress(msg.sender);\\n }\\n\\n // @notice Get the deployment address for the user\\n // @param user The address of the user that is used to determine the deployment address\\n function getUserAddress(address user) public view returns (address payable) {\\n bytes32 salt = bytes32(uint256(uint160(user)));\\n return _predictDeterministicAddress(salt);\\n }\\n\\n // @notice Get the deployment address for a user and label\\n // @param user The address of the user that is used to determine the deployment address\\n // @param label The label that is used to determine the deployment address\\n function getCustomAddress(address user, string memory label) external view returns (address payable) {\\n if (bytes(label).length == 0) revert NoLabel();\\n bytes32 salt = _customSalt(user, label);\\n return _predictDeterministicAddress(salt);\\n }\\n\\n // @notice The internal function for deploying a new wallet\\n // @param salt The salt for deploy the address deterministically\\n // @param label The label to identify deployment in the emitted event\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function _deploy(\\n bytes32 salt,\\n string memory label,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) internal returns (IEnsoWallet instance) {\\n instance = IEnsoWallet(payable(ensoBeacon.cloneDeterministic(salt)));\\n instance.initialize{value: msg.value}(msg.sender, salt, shortcutId, commands, state);\\n emit Deployed(instance, label, msg.sender);\\n }\\n\\n // @notice Internal function to generate a custom salt using a user address and label\\n // @param user The address of the user\\n // @param label The label to identify the deployment\\n function _customSalt(address user, string memory label) internal pure returns (bytes32) {\\n return keccak256(abi.encode(user, label));\\n }\\n\\n // @notice Internal function to derive the deployment address from a salt\\n // @param salt The bytes32 salt to generate the deployment address\\n function _predictDeterministicAddress(bytes32 salt) internal view returns (address payable) {\\n return payable(ensoBeacon.predictDeterministicAddress(salt, address(this)));\\n }\\n\\n // @notice Internal function to support UUPS upgrades of the implementing proxy\\n // @notice newImplementation Address of the new implementation\\n function _authorizeUpgrade(address newImplementation) internal view override {\\n (newImplementation);\\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\\n }\\n}\\n\",\"keccak256\":\"0xab39d6fcfc6bb327e3fb25daf55a355a40d50db03b45df3603a47d6de3240c44\",\"license\":\"GPL-3.0-only\"},\"contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../libraries/StorageAPI.sol\\\";\\n\\n// @notice The OWNER slot must be set in the importing contract's constructor or initialize function\\nabstract contract Ownable {\\n using StorageAPI for bytes32;\\n\\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\\n bytes32 internal constant OWNER = bytes32(uint256(keccak256(\\\"enso.access.owner\\\")) - 1);\\n bytes32 internal constant PENDING_OWNER = bytes32(uint256(keccak256(\\\"enso.access.pendingOwner\\\")) - 1);\\n\\n event OwnershipTransferred(address previousOwner, address newOwner);\\n event OwnershipTransferStarted(address previousOwner, address newOwner);\\n\\n error NotOwner();\\n error NotPermitted();\\n error InvalidAccount();\\n\\n modifier onlyOwner() {\\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\\n _;\\n }\\n\\n // @notice Transfer ownership of this contract, ownership is only transferred after new owner accepts\\n // @param newOwner The address of the new owner\\n function transferOwnership(address newOwner) external onlyOwner {\\n if (newOwner == address(0)) revert InvalidAccount();\\n address currentOwner = OWNER.getAddress();\\n if (newOwner == currentOwner) revert InvalidAccount();\\n PENDING_OWNER.setAddress(newOwner);\\n emit OwnershipTransferStarted(currentOwner, newOwner);\\n }\\n\\n // @notice Accept ownership of this contract\\n function acceptOwnership() external {\\n if (msg.sender != PENDING_OWNER.getAddress()) revert NotPermitted();\\n PENDING_OWNER.setAddress(address(0));\\n address previousOwner = OWNER.getAddress();\\n OWNER.setAddress(msg.sender);\\n emit OwnershipTransferred(previousOwner, msg.sender);\\n }\\n\\n // @notice The current owner of this contract\\n // @return The address of the current owner\\n function owner() external view returns (address) {\\n return OWNER.getAddress();\\n }\\n}\\n\",\"keccak256\":\"0x6c3d1c0d6d0bff49a455bbdd4a5932f686c1962596359e563e46ba85bd526f19\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IEnsoWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\ninterface IEnsoWallet {\\n function initialize(\\n address owner,\\n bytes32 salt,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x89b70b390e1f8e2a2dae065ea79a517bd86bb4ea291cb71528705d04c3cc63db\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/BeaconClones.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\\n// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol\\n\\npragma solidity ^0.8.16;\\n\\nlibrary BeaconClones {\\n /**\\n * @dev Deploys and returns the address of a clone that gets an implementation\\n * from the `beacon` and mimics its behaviour.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `beacon` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address beacon, bytes32 salt) internal returns (address instance) {\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\\n mstore(add(ptr, 0x54), shl(0x60, beacon))\\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c634300081000330000)\\n instance := create2(0, ptr, 0xc6, salt)\\n }\\n require(instance != address(0), \\\"create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address beacon,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\\n mstore(add(ptr, 0x54), shl(0x60, beacon))\\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033ff00)\\n mstore(add(ptr, 0xc7), shl(0x60, deployer))\\n mstore(add(ptr, 0xdb), salt)\\n mstore(add(ptr, 0xfb), keccak256(ptr, 0xc6))\\n predicted := keccak256(add(ptr, 0xc6), 0x55)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x33a2ffe0c38814c3c07d637034001d3d8f2b13ded07f26135ac32800ff520a63\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/StorageAPI.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nlibrary StorageAPI {\\n function setBytes(bytes32 key, bytes memory data) internal {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := mload(data)\\n switch gt(length, 0x1F)\\n case 0x00 {\\n sstore(key, or(mload(add(data, 0x20)), mul(length, 2)))\\n }\\n case 0x01 {\\n sstore(key, add(mul(length, 2), 1))\\n for {\\n let i := 0\\n } lt(mul(i, 0x20), length) {\\n i := add(i, 0x01)\\n } {\\n sstore(add(slot, i), mload(add(data, mul(add(i, 1), 0x20))))\\n }\\n }\\n }\\n }\\n\\n function setBytes32(bytes32 key, bytes32 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setAddress(bytes32 key, address a) internal {\\n assembly {\\n sstore(key, a)\\n }\\n }\\n\\n function setUint256(bytes32 key, uint256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setInt256(bytes32 key, int256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setBool(bytes32 key, bool val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function getBytes(bytes32 key) internal view returns (bytes memory data) {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := sload(key)\\n switch and(length, 0x01)\\n case 0x00 {\\n let decodedLength := div(and(length, 0xFF), 2)\\n mstore(data, decodedLength)\\n mstore(add(data, 0x20), and(length, not(0xFF)))\\n mstore(0x40, add(data, 0x40))\\n }\\n case 0x01 {\\n let decodedLength := div(length, 2)\\n let i := 0\\n mstore(data, decodedLength)\\n for {\\n\\n } lt(mul(i, 0x20), decodedLength) {\\n i := add(i, 0x01)\\n } {\\n mstore(add(add(data, 0x20), mul(i, 0x20)), sload(add(slot, i)))\\n }\\n mstore(0x40, add(data, add(0x20, mul(i, 0x20))))\\n }\\n }\\n }\\n\\n function getBytes32(bytes32 key) internal view returns (bytes32 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getAddress(bytes32 key) internal view returns (address a) {\\n assembly {\\n a := sload(key)\\n }\\n }\\n\\n function getUint256(bytes32 key) internal view returns (uint256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getInt256(bytes32 key) internal view returns (int256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getBool(bytes32 key) internal view returns (bool val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x78e99bac7eb0e62568a67c1dfd3f4d14b9c8be7e866d4205de91f01305e557a8\",\"license\":\"GPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60c0346100b757601f611c1038819003918201601f19168301916001600160401b038311848410176100bc578084926020946040528339810103126100b757516001600160a01b039081811681036100b7573060805260a0527febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d055604051611b3d90816100d382396080518181816104250152818161069e0152610743015260a051818181610599015281816117a20152611a3d0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610013575b600080fd5b60003560e01c80631289ad05146101175780633659cfe61461010e57806338cc48311461010557806349061ae6146100fc5780634d6849d2146100f35780634f1ef286146100ea57806352d1902d146100e157806379ba5097146100d85780638454525b146100cf5780638da5cb5b146100c6578063c4d66de8146100bd578063f2fde38b146100b45763ffa2ca3b146100ac57600080fd5b61000e610be8565b5061000e610ae9565b5061000e610a14565b5061000e6109a2565b5061000e61092f565b5061000e610818565b5061000e6106fc565b5061000e61061f565b5061000e6105bd565b5061000e61054d565b5061000e6104f4565b5061000e6103d2565b5061000e6102b9565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161016457604052565b61016c610120565b604052565b6020810190811067ffffffffffffffff82111761016457604052565b6060810190811067ffffffffffffffff82111761016457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761016457604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111610226575b01160190565b61022e610120565b610220565b92919261023f826101ea565b9161024d60405193846101a9565b82948184528183011161000e578281602093846000960137010152565b9080601f8301121561000e5781602061028593359101610233565b90565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e5761030590369060040161026a565b60443582811161000e5761031d903690600401610288565b909260643590811161000e57610337903690600401610288565b91835115610385576103819461035a9460243590610355813361195a565b611716565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b60046040517f19240aab000000000000000000000000000000000000000000000000000000008152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361000e57565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5761040a6103af565b73ffffffffffffffffffffffffffffffffffffffff61047b817f00000000000000000000000000000000000000000000000000000000000000001661045181301415610c89565b827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614610d14565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0541633036104bf576040516104bd916104b482610171565b60008252610e46565b005b60046040517f30cd7471000000000000000000000000000000000000000000000000000000008152fd5b600091031261000e57565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602061052f336119c7565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff610616816106106103af565b166119c7565b60405191168152f35b5060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576106526103af565b60243567ffffffffffffffff811161000e573660238201121561000e57610683903690602481600401359101610233565b73ffffffffffffffffffffffffffffffffffffffff6106ca817f00000000000000000000000000000000000000000000000000000000000000001661045181301415610c89565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0541633036104bf576104bd91610fc3565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610794576040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152602090f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e577f4be222fb9f9e9f4aed563932b8b081b3887ff710df7cb9700c19ef7af1497d8e73ffffffffffffffffffffffffffffffffffffffff815416330361090557600090557febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0805433918290556040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091819081015b0390a1005b60046040517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576109676103af565b60243567ffffffffffffffff811161000e5761098790369060040161026a565b8051156103855761099d61052f9160209361195a565b6119c7565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760207febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d05473ffffffffffffffffffffffffffffffffffffffff60405191168152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57610a4c6103af565b73ffffffffffffffffffffffffffffffffffffffff80821615610abf577febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d090815416610a955755005b60046040517fef34ca5c000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57610b216103af565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0549073ffffffffffffffffffffffffffffffffffffffff808316908133036104bf5782168015610abf5714610abf577f4be222fb9f9e9f4aed563932b8b081b3887ff710df7cb9700c19ef7af1497d8e8190556040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700919081908101610900565b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60243581811161000e57610c34903690600401610288565b91906044359180831161000e57602093610c5561052f943690600401610288565b6040519094919387820190811182821017610c7c575b604052600081526004359033611716565b610c84610120565b610c6b565b15610c9057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152fd5b15610d1b57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152fd5b9081602091031261000e575190565b506040513d6000823e3d90fd5b15610dc257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152fd5b90610e727f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b15610e835750610e819061112a565b565b604051917f52d1902d00000000000000000000000000000000000000000000000000000000835260208360048173ffffffffffffffffffffffffffffffffffffffff85165afa60009381610f93575b50610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608490fd5b0390fd5b610f8e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610e819414610dbb565b611216565b610fb591945060203d8111610fbc575b610fad81836101a9565b810190610d9f565b9238610ed2565b503d610fa3565b90610fef7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b15610ffe5750610e819061112a565b604051917f52d1902d00000000000000000000000000000000000000000000000000000000835260208360048173ffffffffffffffffffffffffffffffffffffffff85165afa6000938161110a575b506110d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608490fd5b6111057f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610e819414610dbb565b611327565b61112391945060203d8111610fbc57610fad81836101a9565b923861104d565b803b156111925773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc91167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b61121f8161112a565b6040519060009073ffffffffffffffffffffffffffffffffffffffff81167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8385a2835115801590611320575b611277575b50505050565b818061130d956112868661018d565b602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208701527f206661696c6564000000000000000000000000000000000000000000000000006040870152602081519101845af4903d15611317573d6112f0816101ea565b906112fe60405192836101a9565b8152809360203d92013e61142e565b5038808080611271565b6060925061142e565b508161126c565b6113308161112a565b6040519073ffffffffffffffffffffffffffffffffffffffff81167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600084a2825115801590611426575b61138457505050565b60008061141b946113948561018d565b602785527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208601527f206661696c6564000000000000000000000000000000000000000000000000006040860152602081519101845af43d1561141e573d916113fe836101ea565b9261140c60405194856101a9565b83523d6000602085013e61142e565b50565b60609161142e565b50600161137b565b919290156114a95750815115611442575090565b3b1561144b5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156114bc5750805190602001fd5b610f5c906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301905b919082519283825260005b8481106115405750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201611501565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b939194929073ffffffffffffffffffffffffffffffffffffffff9097969716845260209485850152604084015260a060608401528160a08401527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821161000e5784939295949160051b809160c088013785019460c0860190608060c0828903019101525260e084019360e08360051b82010194846000925b85841061163d575050505050505090565b909192939495967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2082820301845287357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181121561000e57830186810191903567ffffffffffffffff811161000e57803603831361000e576116c888928392600195611554565b99019401940192959493919061162c565b919061170f60409295949573ffffffffffffffffffffffffffffffffffffffff80931685526060602086015260608501906114f6565b9416910152565b9396959490929173ffffffffffffffffffffffffffffffffffffffff8560c66040517f6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe608081527f6040526040517f5c60da1b0000000000000000000000000000000000000000006020820152788152600060016020826004857300000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060601b60548201527f5afa0360705780513682833781823684845af490503d82833e808015606c573d60688201527f83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e60888201527fc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033000060a88201526000f5169485156118fc578598863b1561000e577ffb896a1c46a5b12a7e44f5f16c83d1bb4d9598a3501f4eb920f2966e0def0523976000946118ad9260405197889687967ff4adeb750000000000000000000000000000000000000000000000000000000088523360048901611593565b038134875af180156118ef575b6118d6575b506118d16040519283923391846116d9565b0390a1565b806118e36118e992610150565b806104e9565b386118bf565b6118f7610dae565b6118ba565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746532206661696c65640000000000000000000000000000000000006044820152fd5b906119c16119959160405192839173ffffffffffffffffffffffffffffffffffffffff602084019616865260408084015260608301906114f6565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826101a9565b51902090565b605560c661028592604051907f6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe608082527f6040526040517f5c60da1b0000000000000000000000000000000000000000006020830152788152600060016020826004857300000000000000000000000060408301527f000000000000000000000000000000000000000000000000000000000000000060601b60548301527f5afa0360705780513682833781823684845af490503d82833e808015606c573d60688301527f83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e60888301527fc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033ff0060a88301523060601b60c783015260db82015281812060fb820152012073ffffffffffffffffffffffffffffffffffffffff169056fea26469706673582212207777c6fc2a0ebecbe240ee783e01cb618360093568379d4ca81a0301c8868c5d64736f6c63430008100033", + "deployedBytecode": "0x60806040526004361015610013575b600080fd5b60003560e01c80631289ad05146101175780633659cfe61461010e57806338cc48311461010557806349061ae6146100fc5780634d6849d2146100f35780634f1ef286146100ea57806352d1902d146100e157806379ba5097146100d85780638454525b146100cf5780638da5cb5b146100c6578063c4d66de8146100bd578063f2fde38b146100b45763ffa2ca3b146100ac57600080fd5b61000e610be8565b5061000e610ae9565b5061000e610a14565b5061000e6109a2565b5061000e61092f565b5061000e610818565b5061000e6106fc565b5061000e61061f565b5061000e6105bd565b5061000e61054d565b5061000e6104f4565b5061000e6103d2565b5061000e6102b9565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161016457604052565b61016c610120565b604052565b6020810190811067ffffffffffffffff82111761016457604052565b6060810190811067ffffffffffffffff82111761016457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761016457604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111610226575b01160190565b61022e610120565b610220565b92919261023f826101ea565b9161024d60405193846101a9565b82948184528183011161000e578281602093846000960137010152565b9080601f8301121561000e5781602061028593359101610233565b90565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e5761030590369060040161026a565b60443582811161000e5761031d903690600401610288565b909260643590811161000e57610337903690600401610288565b91835115610385576103819461035a9460243590610355813361195a565b611716565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b60046040517f19240aab000000000000000000000000000000000000000000000000000000008152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361000e57565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5761040a6103af565b73ffffffffffffffffffffffffffffffffffffffff61047b817f00000000000000000000000000000000000000000000000000000000000000001661045181301415610c89565b827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614610d14565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0541633036104bf576040516104bd916104b482610171565b60008252610e46565b005b60046040517f30cd7471000000000000000000000000000000000000000000000000000000008152fd5b600091031261000e57565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602061052f336119c7565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff610616816106106103af565b166119c7565b60405191168152f35b5060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576106526103af565b60243567ffffffffffffffff811161000e573660238201121561000e57610683903690602481600401359101610233565b73ffffffffffffffffffffffffffffffffffffffff6106ca817f00000000000000000000000000000000000000000000000000000000000000001661045181301415610c89565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0541633036104bf576104bd91610fc3565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610794576040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152602090f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e577f4be222fb9f9e9f4aed563932b8b081b3887ff710df7cb9700c19ef7af1497d8e73ffffffffffffffffffffffffffffffffffffffff815416330361090557600090557febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0805433918290556040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091819081015b0390a1005b60046040517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576109676103af565b60243567ffffffffffffffff811161000e5761098790369060040161026a565b8051156103855761099d61052f9160209361195a565b6119c7565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760207febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d05473ffffffffffffffffffffffffffffffffffffffff60405191168152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57610a4c6103af565b73ffffffffffffffffffffffffffffffffffffffff80821615610abf577febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d090815416610a955755005b60046040517fef34ca5c000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6d187b28000000000000000000000000000000000000000000000000000000008152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57610b216103af565b7febef2b212afb6c9cfdbd10b61834a8dc955e5fbf0aacd1c641d5cbdedf4022d0549073ffffffffffffffffffffffffffffffffffffffff808316908133036104bf5782168015610abf5714610abf577f4be222fb9f9e9f4aed563932b8b081b3887ff710df7cb9700c19ef7af1497d8e8190556040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700919081908101610900565b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60243581811161000e57610c34903690600401610288565b91906044359180831161000e57602093610c5561052f943690600401610288565b6040519094919387820190811182821017610c7c575b604052600081526004359033611716565b610c84610120565b610c6b565b15610c9057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152fd5b15610d1b57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152fd5b9081602091031261000e575190565b506040513d6000823e3d90fd5b15610dc257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152fd5b90610e727f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b15610e835750610e819061112a565b565b604051917f52d1902d00000000000000000000000000000000000000000000000000000000835260208360048173ffffffffffffffffffffffffffffffffffffffff85165afa60009381610f93575b50610f60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608490fd5b0390fd5b610f8e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610e819414610dbb565b611216565b610fb591945060203d8111610fbc575b610fad81836101a9565b810190610d9f565b9238610ed2565b503d610fa3565b90610fef7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b15610ffe5750610e819061112a565b604051917f52d1902d00000000000000000000000000000000000000000000000000000000835260208360048173ffffffffffffffffffffffffffffffffffffffff85165afa6000938161110a575b506110d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608490fd5b6111057f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610e819414610dbb565b611327565b61112391945060203d8111610fbc57610fad81836101a9565b923861104d565b803b156111925773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc91167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b61121f8161112a565b6040519060009073ffffffffffffffffffffffffffffffffffffffff81167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8385a2835115801590611320575b611277575b50505050565b818061130d956112868661018d565b602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208701527f206661696c6564000000000000000000000000000000000000000000000000006040870152602081519101845af4903d15611317573d6112f0816101ea565b906112fe60405192836101a9565b8152809360203d92013e61142e565b5038808080611271565b6060925061142e565b508161126c565b6113308161112a565b6040519073ffffffffffffffffffffffffffffffffffffffff81167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600084a2825115801590611426575b61138457505050565b60008061141b946113948561018d565b602785527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208601527f206661696c6564000000000000000000000000000000000000000000000000006040860152602081519101845af43d1561141e573d916113fe836101ea565b9261140c60405194856101a9565b83523d6000602085013e61142e565b50565b60609161142e565b50600161137b565b919290156114a95750815115611442575090565b3b1561144b5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156114bc5750805190602001fd5b610f5c906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301905b919082519283825260005b8481106115405750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201611501565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b939194929073ffffffffffffffffffffffffffffffffffffffff9097969716845260209485850152604084015260a060608401528160a08401527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821161000e5784939295949160051b809160c088013785019460c0860190608060c0828903019101525260e084019360e08360051b82010194846000925b85841061163d575050505050505090565b909192939495967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2082820301845287357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181121561000e57830186810191903567ffffffffffffffff811161000e57803603831361000e576116c888928392600195611554565b99019401940192959493919061162c565b919061170f60409295949573ffffffffffffffffffffffffffffffffffffffff80931685526060602086015260608501906114f6565b9416910152565b9396959490929173ffffffffffffffffffffffffffffffffffffffff8560c66040517f6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe608081527f6040526040517f5c60da1b0000000000000000000000000000000000000000006020820152788152600060016020826004857300000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060601b60548201527f5afa0360705780513682833781823684845af490503d82833e808015606c573d60688201527f83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e60888201527fc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033000060a88201526000f5169485156118fc578598863b1561000e577ffb896a1c46a5b12a7e44f5f16c83d1bb4d9598a3501f4eb920f2966e0def0523976000946118ad9260405197889687967ff4adeb750000000000000000000000000000000000000000000000000000000088523360048901611593565b038134875af180156118ef575b6118d6575b506118d16040519283923391846116d9565b0390a1565b806118e36118e992610150565b806104e9565b386118bf565b6118f7610dae565b6118ba565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63726561746532206661696c65640000000000000000000000000000000000006044820152fd5b906119c16119959160405192839173ffffffffffffffffffffffffffffffffffffffff602084019616865260408084015260608301906114f6565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826101a9565b51902090565b605560c661028592604051907f6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe608082527f6040526040517f5c60da1b0000000000000000000000000000000000000000006020830152788152600060016020826004857300000000000000000000000060408301527f000000000000000000000000000000000000000000000000000000000000000060601b60548301527f5afa0360705780513682833781823684845af490503d82833e808015606c573d60688301527f83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e60888301527fc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033ff0060a88301523060601b60c783015260db82015281812060fb820152012073ffffffffffffffffffffffffffffffffffffffff169056fea26469706673582212207777c6fc2a0ebecbe240ee783e01cb618360093568379d4ca81a0301c8868c5d64736f6c63430008100033", + "devdoc": { + "kind": "dev", + "methods": { + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/FactoryDeployer.json b/deployments/linea/FactoryDeployer.json new file mode 100644 index 0000000..81154ae --- /dev/null +++ b/deployments/linea/FactoryDeployer.json @@ -0,0 +1,73 @@ +{ + "address": "0xc3a77152e7C91109438fEc3962E778E2123Cb26e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "factoryImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x84c059055bd9687357963b5600aaa882fc5a37325b06a9dab040e9b85bb1d156", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x826e0BB2276271eFdF2a500597f37b94f6c153bA", + "contractAddress": null, + "transactionIndex": 7, + "gasUsed": "212532", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7b21c6f0fedc85bbcb4de0b30f1f2ca57359f0a560068f650c518cdf5e4ef88d", + "transactionHash": "0x84c059055bd9687357963b5600aaa882fc5a37325b06a9dab040e9b85bb1d156", + "logs": [], + "blockNumber": 1195806, + "cumulativeGasUsed": "797030", + "status": 1, + "byzantium": true + }, + "args": [ + "0x277D98D33b7F44921d4230697DeF8d1D56aBAa62", + "0x66fc62c1748E45435b06cF8dD105B73E9855F93E" + ], + "numDeployments": 1, + "solcInputHash": "6e9a09176756a7e15ef5f84545755d11", + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factoryImplementation\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployer/FactoryDeployer.sol\":\"FactoryDeployer\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 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(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\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\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/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\"},\"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../ERC1967/ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\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. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n}\\n\",\"keccak256\":\"0x85cc5aca68692044586dc5ca19a9868d3288f6b35d1085c620dd0278ed0abdaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\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 /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"contracts/EnsoWalletFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"./libraries/BeaconClones.sol\\\";\\nimport \\\"./access/Ownable.sol\\\";\\nimport \\\"./interfaces/IEnsoWallet.sol\\\";\\n\\ncontract EnsoWalletFactory is Ownable, UUPSUpgradeable {\\n using StorageAPI for bytes32;\\n using BeaconClones for address;\\n\\n address public immutable ensoBeacon;\\n\\n event Deployed(IEnsoWallet instance, string label, address deployer);\\n\\n error AlreadyInit();\\n error NoLabel();\\n\\n constructor(address ensoBeacon_) {\\n ensoBeacon = ensoBeacon_;\\n // Set owner to 0xff so that the implementation cannot be initialized\\n OWNER.setAddress(address(type(uint160).max));\\n }\\n\\n // @notice A function to initialize state on the proxy the delegates to this contract\\n // @param newOwner The new owner of this contract\\n function initialize(address newOwner) external {\\n if (newOwner == address(0)) revert InvalidAccount();\\n if (OWNER.getAddress() != address(0)) revert AlreadyInit();\\n OWNER.setAddress(newOwner);\\n }\\n\\n // @notice Deploy a wallet using the msg.sender as the salt\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function deploy(\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) public payable returns (IEnsoWallet) {\\n bytes32 salt = bytes32(uint256(uint160(msg.sender)));\\n return _deploy(salt, \\\"\\\", shortcutId, commands, state);\\n }\\n\\n // @notice Deploy a wallet using a hash of the msg.sender and a label as the salt\\n // @param label The label to identify deployment\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function deployCustom(\\n string memory label,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) public payable returns (IEnsoWallet) {\\n if (bytes(label).length == 0) revert NoLabel();\\n bytes32 salt = _customSalt(msg.sender, label);\\n return _deploy(salt, label, shortcutId, commands, state);\\n }\\n\\n // @notice Get the deployment address for the msg.sender\\n function getAddress() public view returns (address payable) {\\n return getUserAddress(msg.sender);\\n }\\n\\n // @notice Get the deployment address for the user\\n // @param user The address of the user that is used to determine the deployment address\\n function getUserAddress(address user) public view returns (address payable) {\\n bytes32 salt = bytes32(uint256(uint160(user)));\\n return _predictDeterministicAddress(salt);\\n }\\n\\n // @notice Get the deployment address for a user and label\\n // @param user The address of the user that is used to determine the deployment address\\n // @param label The label that is used to determine the deployment address\\n function getCustomAddress(address user, string memory label) external view returns (address payable) {\\n if (bytes(label).length == 0) revert NoLabel();\\n bytes32 salt = _customSalt(user, label);\\n return _predictDeterministicAddress(salt);\\n }\\n\\n // @notice The internal function for deploying a new wallet\\n // @param salt The salt for deploy the address deterministically\\n // @param label The label to identify deployment in the emitted event\\n // @param shortcutId The bytes32 value representing a shortcut\\n // @param commands The optional commands for executing a shortcut after deployment\\n // @param state The optional state for executing a shortcut after deployment\\n function _deploy(\\n bytes32 salt,\\n string memory label,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) internal returns (IEnsoWallet instance) {\\n instance = IEnsoWallet(payable(ensoBeacon.cloneDeterministic(salt)));\\n instance.initialize{value: msg.value}(msg.sender, salt, shortcutId, commands, state);\\n emit Deployed(instance, label, msg.sender);\\n }\\n\\n // @notice Internal function to generate a custom salt using a user address and label\\n // @param user The address of the user\\n // @param label The label to identify the deployment\\n function _customSalt(address user, string memory label) internal pure returns (bytes32) {\\n return keccak256(abi.encode(user, label));\\n }\\n\\n // @notice Internal function to derive the deployment address from a salt\\n // @param salt The bytes32 salt to generate the deployment address\\n function _predictDeterministicAddress(bytes32 salt) internal view returns (address payable) {\\n return payable(ensoBeacon.predictDeterministicAddress(salt, address(this)));\\n }\\n\\n // @notice Internal function to support UUPS upgrades of the implementing proxy\\n // @notice newImplementation Address of the new implementation\\n function _authorizeUpgrade(address newImplementation) internal view override {\\n (newImplementation);\\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\\n }\\n}\\n\",\"keccak256\":\"0xab39d6fcfc6bb327e3fb25daf55a355a40d50db03b45df3603a47d6de3240c44\",\"license\":\"GPL-3.0-only\"},\"contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../libraries/StorageAPI.sol\\\";\\n\\n// @notice The OWNER slot must be set in the importing contract's constructor or initialize function\\nabstract contract Ownable {\\n using StorageAPI for bytes32;\\n\\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\\n bytes32 internal constant OWNER = bytes32(uint256(keccak256(\\\"enso.access.owner\\\")) - 1);\\n bytes32 internal constant PENDING_OWNER = bytes32(uint256(keccak256(\\\"enso.access.pendingOwner\\\")) - 1);\\n\\n event OwnershipTransferred(address previousOwner, address newOwner);\\n event OwnershipTransferStarted(address previousOwner, address newOwner);\\n\\n error NotOwner();\\n error NotPermitted();\\n error InvalidAccount();\\n\\n modifier onlyOwner() {\\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\\n _;\\n }\\n\\n // @notice Transfer ownership of this contract, ownership is only transferred after new owner accepts\\n // @param newOwner The address of the new owner\\n function transferOwnership(address newOwner) external onlyOwner {\\n if (newOwner == address(0)) revert InvalidAccount();\\n address currentOwner = OWNER.getAddress();\\n if (newOwner == currentOwner) revert InvalidAccount();\\n PENDING_OWNER.setAddress(newOwner);\\n emit OwnershipTransferStarted(currentOwner, newOwner);\\n }\\n\\n // @notice Accept ownership of this contract\\n function acceptOwnership() external {\\n if (msg.sender != PENDING_OWNER.getAddress()) revert NotPermitted();\\n PENDING_OWNER.setAddress(address(0));\\n address previousOwner = OWNER.getAddress();\\n OWNER.setAddress(msg.sender);\\n emit OwnershipTransferred(previousOwner, msg.sender);\\n }\\n\\n // @notice The current owner of this contract\\n // @return The address of the current owner\\n function owner() external view returns (address) {\\n return OWNER.getAddress();\\n }\\n}\\n\",\"keccak256\":\"0x6c3d1c0d6d0bff49a455bbdd4a5932f686c1962596359e563e46ba85bd526f19\",\"license\":\"GPL-3.0-only\"},\"contracts/deployer/FactoryDeployer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../EnsoWalletFactory.sol\\\";\\nimport \\\"../proxy/UpgradeableProxy.sol\\\";\\n\\ncontract FactoryDeployer {\\n address public immutable factory;\\n\\n constructor(address owner, address factoryImplementation) {\\n factory = address(new UpgradeableProxy(factoryImplementation));\\n EnsoWalletFactory(factory).initialize(owner);\\n }\\n}\",\"keccak256\":\"0xc00dbec3f5d84f0d63850345db4d7ed3fae2b622a954464b02df682cd7aeda3f\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IEnsoWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\ninterface IEnsoWallet {\\n function initialize(\\n address owner,\\n bytes32 salt,\\n bytes32 shortcutId,\\n bytes32[] calldata commands,\\n bytes[] calldata state\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x89b70b390e1f8e2a2dae065ea79a517bd86bb4ea291cb71528705d04c3cc63db\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/BeaconClones.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\\n// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol\\n\\npragma solidity ^0.8.16;\\n\\nlibrary BeaconClones {\\n /**\\n * @dev Deploys and returns the address of a clone that gets an implementation\\n * from the `beacon` and mimics its behaviour.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `beacon` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address beacon, bytes32 salt) internal returns (address instance) {\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\\n mstore(add(ptr, 0x54), shl(0x60, beacon))\\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c634300081000330000)\\n instance := create2(0, ptr, 0xc6, salt)\\n }\\n require(instance != address(0), \\\"create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address beacon,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\\n mstore(add(ptr, 0x54), shl(0x60, beacon))\\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033ff00)\\n mstore(add(ptr, 0xc7), shl(0x60, deployer))\\n mstore(add(ptr, 0xdb), salt)\\n mstore(add(ptr, 0xfb), keccak256(ptr, 0xc6))\\n predicted := keccak256(add(ptr, 0xc6), 0x55)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x33a2ffe0c38814c3c07d637034001d3d8f2b13ded07f26135ac32800ff520a63\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/StorageAPI.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nlibrary StorageAPI {\\n function setBytes(bytes32 key, bytes memory data) internal {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := mload(data)\\n switch gt(length, 0x1F)\\n case 0x00 {\\n sstore(key, or(mload(add(data, 0x20)), mul(length, 2)))\\n }\\n case 0x01 {\\n sstore(key, add(mul(length, 2), 1))\\n for {\\n let i := 0\\n } lt(mul(i, 0x20), length) {\\n i := add(i, 0x01)\\n } {\\n sstore(add(slot, i), mload(add(data, mul(add(i, 1), 0x20))))\\n }\\n }\\n }\\n }\\n\\n function setBytes32(bytes32 key, bytes32 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setAddress(bytes32 key, address a) internal {\\n assembly {\\n sstore(key, a)\\n }\\n }\\n\\n function setUint256(bytes32 key, uint256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setInt256(bytes32 key, int256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setBool(bytes32 key, bool val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function getBytes(bytes32 key) internal view returns (bytes memory data) {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := sload(key)\\n switch and(length, 0x01)\\n case 0x00 {\\n let decodedLength := div(and(length, 0xFF), 2)\\n mstore(data, decodedLength)\\n mstore(add(data, 0x20), and(length, not(0xFF)))\\n mstore(0x40, add(data, 0x40))\\n }\\n case 0x01 {\\n let decodedLength := div(length, 2)\\n let i := 0\\n mstore(data, decodedLength)\\n for {\\n\\n } lt(mul(i, 0x20), decodedLength) {\\n i := add(i, 0x01)\\n } {\\n mstore(add(add(data, 0x20), mul(i, 0x20)), sload(add(slot, i)))\\n }\\n mstore(0x40, add(data, add(0x20, mul(i, 0x20))))\\n }\\n }\\n }\\n\\n function getBytes32(bytes32 key) internal view returns (bytes32 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getAddress(bytes32 key) internal view returns (address a) {\\n assembly {\\n a := sload(key)\\n }\\n }\\n\\n function getUint256(bytes32 key) internal view returns (uint256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getInt256(bytes32 key) internal view returns (int256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getBool(bytes32 key) internal view returns (bool val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x78e99bac7eb0e62568a67c1dfd3f4d14b9c8be7e866d4205de91f01305e557a8\",\"license\":\"GPL-3.0-only\"},\"contracts/proxy/UpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\ncontract UpgradeableProxy {\\n bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n constructor(address implementation) {\\n assembly {\\n sstore(_IMPLEMENTATION_SLOT, implementation)\\n }\\n }\\n\\n fallback() external payable {\\n assembly {\\n let addr := sload(_IMPLEMENTATION_SLOT)\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9981dda94f57a6006feeac1182dc0eb35137e6cd2e4975e1bd0261d25852754b\",\"license\":\"GPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60a0346101315761032c906001600160401b03601f38849003908101601f19168301908282118483101761011b578084916040968794855283398101031261013157610056602061004f84610136565b9301610136565b9083519161011592838101938185108486111761011b5761021782396001600160a01b0391821684526000938190036020019084f080156101115781169384608052843b1561010d579060248492838851978894859363189acdbd60e31b85521660048401525af18015610103576100de575b835160cc908161014b823960805181606e0152f35b82116100ef575081523880806100c9565b634e487b7160e01b81526041600452602490fd5b84513d84823e3d90fd5b8380fd5b85513d85823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b51906001600160a01b03821682036101315756fe6080806040526004361015601257600080fd5b600090813560e01c63c45a015514602857600080fd5b34609257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011260925760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5080fdfea2646970667358221220c15ed828a122ef102e733c0baf1f10268888e5f2bfcbead7fff9da20d0f3556664736f6c6343000810003360803461007f57601f61011538819003918201601f19168301916001600160401b038311848410176100845780849260209460405283398101031261007f57516001600160a01b038116810361007f577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55604051607a908161009b8239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546000808092368280378136915af43d82803e156040573d90f35b3d90fdfea2646970667358221220046a161a8425923cc58596cf54b20bbb46d2831a8f95750922f86f6ec33c285764736f6c63430008100033", + "deployedBytecode": "0x6080806040526004361015601257600080fd5b600090813560e01c63c45a015514602857600080fd5b34609257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011260925760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5080fdfea2646970667358221220c15ed828a122ef102e733c0baf1f10268888e5f2bfcbead7fff9da20d0f3556664736f6c63430008100033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/MinimalWallet.json b/deployments/linea/MinimalWallet.json new file mode 100644 index 0000000..916487b --- /dev/null +++ b/deployments/linea/MinimalWallet.json @@ -0,0 +1,452 @@ +{ + "address": "0xb8D76a79B60449deda533B9eeE68a1efcCc9a04C", + "abi": [ + { + "inputs": [], + "name": "InvalidArrayLength", + "type": "error" + }, + { + "inputs": [], + "name": "NotPermitted", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawFailed", + "type": "error" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MODULE_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OWNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "internalType": "struct MinimalWallet.ApprovalNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "revokeApprovals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC1155Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "erc20", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC20Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "revokeERC721Approvals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum MinimalWallet.Protocol", + "name": "protocol", + "type": "uint8" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct MinimalWallet.TransferNote[]", + "name": "notes", + "type": "tuple[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC1155", + "name": "erc1155", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC1155s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20[]", + "name": "erc20s", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "withdrawERC20s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "erc721", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "withdrawERC721s", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x61a1743d12834b9971422b52ea51566f11fa2a972db9dbcac2c0b7c182250d6b", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x826e0BB2276271eFdF2a500597f37b94f6c153bA", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "1470303", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x014869c83be70c96434cdd26ec18fd3ad9969afc08778e2a217a2933b47df5b0", + "transactionHash": "0x61a1743d12834b9971422b52ea51566f11fa2a972db9dbcac2c0b7c182250d6b", + "logs": [], + "blockNumber": 1195799, + "cumulativeGasUsed": "1565067", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "6e9a09176756a7e15ef5f84545755d11", + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WithdrawFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EXECUTOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MODULE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum MinimalWallet.Protocol\",\"name\":\"protocol\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"internalType\":\"struct MinimalWallet.ApprovalNote[]\",\"name\":\"notes\",\"type\":\"tuple[]\"}],\"name\":\"revokeApprovals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"erc1155\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC1155Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC20Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"erc721\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"revokeERC721Approvals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum MinimalWallet.Protocol\",\"name\":\"protocol\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct MinimalWallet.TransferNote[]\",\"name\":\"notes\",\"type\":\"tuple[]\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"erc1155\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC1155s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"erc20s\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC20s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"erc721\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"withdrawERC721s\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onERC721Received(address,address,uint256,bytes)\":{\"details\":\"See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/wallet/MinimalWallet.sol\":\"MinimalWallet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\\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(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n 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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) 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\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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 IERC20 {\\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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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 IERC20Permit {\\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\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/draft-IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.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 SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit 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(IERC20 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 if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9b72f93be69ca894d8492c244259615c4a742afc8d63720dbc8bb81087d9b238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\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(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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\":\"0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Receiver.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC721Receiver} interface.\\n *\\n * Accepts all token transfers.\\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\\n */\\ncontract ERC721Holder is IERC721Receiver {\\n /**\\n * @dev See {IERC721Receiver-onERC721Received}.\\n *\\n * Always returns `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0x0108bf6a6ebd5f96678bed33a35947537263f96766131ee91461fb6485805028\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 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(\\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 (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\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.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 ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"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\"},\"contracts/access/ACL.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"../libraries/StorageAPI.sol\\\";\\n\\nabstract contract ACL {\\n using StorageAPI for bytes32;\\n\\n error NotPermitted();\\n\\n modifier isPermitted(bytes32 role) {\\n bool permitted = _getPermission(role, msg.sender); // TODO: support GSN/Account abstraction\\n if (!permitted) revert NotPermitted();\\n _;\\n }\\n\\n // @notice Gets user permission for a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The permission status\\n function getPermission(bytes32 role, address account) external view returns (bool) {\\n return _getPermission(role, account);\\n }\\n\\n // @notice Internal function to get user permission for a role\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The permission status\\n function _getPermission(bytes32 role, address account) internal view returns (bool) {\\n bytes32 key = _getKey(role, account);\\n return key.getBool();\\n }\\n\\n // @notice Internal function to get the key for the storage slot\\n // @param role The bytes32 value of the role\\n // @param account The address of the account\\n // @return The bytes32 storage slot\\n function _getKey(bytes32 role, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(role, account));\\n }\\n}\\n\",\"keccak256\":\"0x50bc9b50157b89338a27043a7f24d9f6bc93bf624d93c9a4151d74c99340e6c1\",\"license\":\"GPL-3.0-only\"},\"contracts/access/Roles.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nabstract contract Roles {\\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\\n bytes32 public constant OWNER_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.owner\\\")) - 1);\\n bytes32 public constant EXECUTOR_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.executor\\\")) - 1);\\n bytes32 public constant MODULE_ROLE = bytes32(uint256(keccak256(\\\"enso.access.roles.module\\\")) - 1);\\n}\",\"keccak256\":\"0x610f0e86412393a50368863c8c6276e42340535c14c80f9ec126e3c69efd4ad3\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/StorageAPI.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.16;\\n\\nlibrary StorageAPI {\\n function setBytes(bytes32 key, bytes memory data) internal {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := mload(data)\\n switch gt(length, 0x1F)\\n case 0x00 {\\n sstore(key, or(mload(add(data, 0x20)), mul(length, 2)))\\n }\\n case 0x01 {\\n sstore(key, add(mul(length, 2), 1))\\n for {\\n let i := 0\\n } lt(mul(i, 0x20), length) {\\n i := add(i, 0x01)\\n } {\\n sstore(add(slot, i), mload(add(data, mul(add(i, 1), 0x20))))\\n }\\n }\\n }\\n }\\n\\n function setBytes32(bytes32 key, bytes32 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setAddress(bytes32 key, address a) internal {\\n assembly {\\n sstore(key, a)\\n }\\n }\\n\\n function setUint256(bytes32 key, uint256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setInt256(bytes32 key, int256 val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function setBool(bytes32 key, bool val) internal {\\n assembly {\\n sstore(key, val)\\n }\\n }\\n\\n function getBytes(bytes32 key) internal view returns (bytes memory data) {\\n bytes32 slot = keccak256(abi.encodePacked(key));\\n assembly {\\n let length := sload(key)\\n switch and(length, 0x01)\\n case 0x00 {\\n let decodedLength := div(and(length, 0xFF), 2)\\n mstore(data, decodedLength)\\n mstore(add(data, 0x20), and(length, not(0xFF)))\\n mstore(0x40, add(data, 0x40))\\n }\\n case 0x01 {\\n let decodedLength := div(length, 2)\\n let i := 0\\n mstore(data, decodedLength)\\n for {\\n\\n } lt(mul(i, 0x20), decodedLength) {\\n i := add(i, 0x01)\\n } {\\n mstore(add(add(data, 0x20), mul(i, 0x20)), sload(add(slot, i)))\\n }\\n mstore(0x40, add(data, add(0x20, mul(i, 0x20))))\\n }\\n }\\n }\\n\\n function getBytes32(bytes32 key) internal view returns (bytes32 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getAddress(bytes32 key) internal view returns (address a) {\\n assembly {\\n a := sload(key)\\n }\\n }\\n\\n function getUint256(bytes32 key) internal view returns (uint256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getInt256(bytes32 key) internal view returns (int256 val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n\\n function getBool(bytes32 key) internal view returns (bool val) {\\n assembly {\\n val := sload(key)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x78e99bac7eb0e62568a67c1dfd3f4d14b9c8be7e866d4205de91f01305e557a8\",\"license\":\"GPL-3.0-only\"},\"contracts/wallet/MinimalWallet.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\npragma solidity ^0.8.16;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport \\\"../access/ACL.sol\\\";\\nimport \\\"../access/Roles.sol\\\";\\n\\ncontract MinimalWallet is ACL, Roles, ERC721Holder, ERC1155Holder {\\n using SafeERC20 for IERC20;\\n\\n enum Protocol {\\n ETH,\\n ERC20,\\n ERC721,\\n ERC1155\\n }\\n\\n struct TransferNote {\\n Protocol protocol;\\n address token;\\n uint256[] ids;\\n uint256[] amounts;\\n }\\n\\n struct ApprovalNote {\\n Protocol protocol;\\n address token;\\n address[] operators;\\n }\\n\\n error WithdrawFailed();\\n error InvalidArrayLength();\\n\\n ////////////////////////////////////////////////////\\n // External functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n // @notice Withdraw an array of assets\\n // @dev Works for ETH, ERC20s, ERC721s, and ERC1155s\\n // @param notes A tuple that contains the protocol id, token address, array of ids and amounts\\n function withdraw(TransferNote[] calldata notes) external isPermitted(OWNER_ROLE) {\\n TransferNote memory note;\\n Protocol protocol;\\n uint256[] memory ids;\\n uint256[] memory amounts;\\n\\n uint256 length = notes.length;\\n for (uint256 i; i < length; ) {\\n note = notes[i];\\n protocol = note.protocol;\\n if (protocol == Protocol.ETH) {\\n amounts = note.amounts;\\n if (amounts.length != 1) revert InvalidArrayLength();\\n _withdrawETH(amounts[0]);\\n } else if (protocol == Protocol.ERC20) {\\n amounts = note.amounts;\\n if (amounts.length != 1) revert InvalidArrayLength();\\n _withdrawERC20(IERC20(note.token), amounts[0]);\\n } else if (protocol == Protocol.ERC721) {\\n ids = note.ids;\\n _withdrawERC721s(IERC721(note.token), ids);\\n } else if (protocol == Protocol.ERC1155) {\\n ids = note.ids;\\n amounts = note.amounts;\\n _withdrawERC1155s(IERC1155(note.token), ids, amounts);\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Withdraw ETH from this contract to the msg.sender\\n // @param amount The amount of ETH to be withdrawn\\n function withdrawETH(uint256 amount) external isPermitted(OWNER_ROLE) {\\n _withdrawETH(amount);\\n }\\n\\n // @notice Withdraw ERC20s\\n // @param erc20s An array of erc20 addresses\\n // @param amounts An array of amounts for each erc20\\n function withdrawERC20s(\\n IERC20[] calldata erc20s,\\n uint256[] calldata amounts\\n ) external isPermitted(OWNER_ROLE) {\\n uint256 length = erc20s.length;\\n if (amounts.length != length) revert InvalidArrayLength();\\n for (uint256 i; i < length; ) {\\n _withdrawERC20(erc20s[i], amounts[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Withdraw multiple ERC721 ids for a single ERC721 contract\\n // @param erc721 The address of the ERC721 contract\\n // @param ids An array of ids that are to be withdrawn\\n function withdrawERC721s(\\n IERC721 erc721,\\n uint256[] calldata ids\\n ) external isPermitted(OWNER_ROLE) {\\n _withdrawERC721s(erc721, ids);\\n }\\n\\n // @notice Withdraw multiple ERC1155 ids for a single ERC1155 contract\\n // @param erc1155 The address of the ERC155 contract\\n // @param ids An array of ids that are to be withdrawn\\n // @param amounts An array of amounts per id\\n function withdrawERC1155s(\\n IERC1155 erc1155,\\n uint256[] calldata ids,\\n uint256[] calldata amounts\\n ) external isPermitted(OWNER_ROLE) {\\n _withdrawERC1155s(erc1155, ids, amounts);\\n }\\n\\n // @notice Revoke approval on an array of assets and operators\\n // @dev Works for ERC20s, ERC721s, and ERC1155s\\n // @param notes A tuple that contains the protocol id, token address, and array of operators\\n function revokeApprovals(ApprovalNote[] calldata notes) external isPermitted(OWNER_ROLE) {\\n ApprovalNote memory note;\\n Protocol protocol;\\n\\n uint256 length = notes.length;\\n for (uint256 i; i < length; ) {\\n note = notes[i];\\n protocol = note.protocol;\\n if (protocol == Protocol.ERC20) {\\n _revokeERC20Approvals(IERC20(note.token), note.operators);\\n } else if (protocol == Protocol.ERC721) {\\n _revokeERC721Approvals(IERC721(note.token), note.operators);\\n } else if (protocol == Protocol.ERC1155) {\\n _revokeERC1155Approvals(IERC1155(note.token), note.operators);\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n // @notice Revoke approval of an ERC20 for an array of operators\\n // @param erc20 The address of the ERC20 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC20Approvals(\\n IERC20 erc20,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC20Approvals(erc20, operators);\\n }\\n\\n // @notice Revoke approval of an ERC721 for an array of operators\\n // @param erc721 The address of the ERC721 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC721Approvals(\\n IERC721 erc721,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC721Approvals(erc721, operators);\\n }\\n\\n // @notice Revoke approval of an ERC1155 for an array of operators\\n // @param erc1155 The address of the ERC1155 token\\n // @param operators The array of operators to have approval revoked\\n function revokeERC1155Approvals(\\n IERC1155 erc1155,\\n address[] calldata operators\\n ) external isPermitted(OWNER_ROLE) {\\n _revokeERC1155Approvals(erc1155, operators);\\n }\\n\\n ////////////////////////////////////////////////////\\n // Internal functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n function _withdrawETH(uint256 amount) internal {\\n (bool success, ) = msg.sender.call{value: amount}(\\\"\\\");\\n if (!success) revert WithdrawFailed();\\n }\\n\\n function _withdrawERC20(IERC20 erc20, uint256 amount) internal {\\n erc20.safeTransfer(msg.sender, amount);\\n }\\n\\n function _withdrawERC721s(IERC721 erc721, uint256[] memory ids) internal {\\n uint256 length = ids.length;\\n for (uint256 i; i < length; ) {\\n erc721.safeTransferFrom(address(this), msg.sender, ids[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _withdrawERC1155s(IERC1155 erc1155, uint256[] memory ids, uint256[] memory amounts) internal {\\n // safeBatchTransferFrom will validate the array lengths\\n erc1155.safeBatchTransferFrom(address(this), msg.sender, ids, amounts, \\\"\\\");\\n }\\n\\n function _revokeERC20Approvals(IERC20 erc20, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc20.safeApprove(operators[i], 0);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _revokeERC721Approvals(IERC721 erc721, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc721.setApprovalForAll(operators[i], false);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n function _revokeERC1155Approvals(IERC1155 erc1155, address[] memory operators) internal {\\n uint256 length = operators.length;\\n for (uint256 i; i < length; ) {\\n erc1155.setApprovalForAll(operators[i], false);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n ////////////////////////////////////////////////////\\n // Fallback functions //////////////////////////////\\n ////////////////////////////////////////////////////\\n\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x6536a201c06bae58bce6044fb28cef29c88780578dd0bf5b40eba97da8fea228\",\"license\":\"GPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60808060405234610016576119bb908161001c8239f35b600080fdfe6080604081815260049182361015610022575b505050361561002057600080fd5b005b600090813560e01c90816301ffc9a714610f355750806307bd026514610edc5780630fe786e114610e47578063150b7a0214610dbb57806331b455a514610cef57806356255c5314610c8157806360d6c7cf14610c085780638a2685a914610aa3578063a4508b1f1461099a578063a6b520c014610941578063bc197c8114610884578063dedd65241461057d578063e1084a1314610313578063e58378bb146102b6578063e5cb370314610221578063f14210a6146101745763f23a6e610361001257346101715760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101715761011d610ff2565b5061012661104b565b506084359067ffffffffffffffff8211610171575060209261014a91369101611185565b50517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b80fd5b50913461021d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57815160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b825233848201528381526101e0816110da565b51902054156101f6576101f390356113a5565b51f35b90517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b50913461021d57610231366111cc565b909192845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338782015286815261026f816110da565b519020541561028f57506101f3929161028991369161131f565b906118de565b84517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8152f35b5080fd5b50913461021d576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105795767ffffffffffffffff823581811161057557610364903690850161101a565b92908551828101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b825233888201528781526103a0816110da565b519020541561054d579085929183516103b8816110da565b888152888382015260609485910152875b8581106103d557888851f35b8060051b8201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181121561054957820190858236031261054957885191610420836110da565b80358981101561054157835261043785820161106e565b908584019182528a81013590878211610545570136601f8201121561054157610466903690878135910161131f565b928a8101938452519289841015610515576001938085036104ab575073ffffffffffffffffffffffffffffffffffffffff6104a5925116905190611853565b016103c9565b600281036104dc575073ffffffffffffffffffffffffffffffffffffffff6104d79251169051906118de565b6104a5565b6003146104eb575b50506104a5565b73ffffffffffffffffffffffffffffffffffffffff61050e9251169051906118de565b38806104e4565b60248c60218c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8c80fd5b8980fd5b8486517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8380fd5b50913461021d57602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105795767ffffffffffffffff8135818111610575576105cf903690840161101a565b9390918551828101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338882015287815261060c816110da565b519020541561085c578551926106218461108f565b878452878385015260608085818a819801520152875b86811061064357888851f35b8060051b8201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112156105495782016080813603126105495788519061068e8261108f565b8035888110156105415782526106a586820161106e565b8683019081528a820135868111610545576106c390369084016112a1565b918b84019283528881013590878211610858576106e2913691016112a1565b9288810193845251918983101561082c578261074857505050516001815103610720579061071a6107146001936112bf565b516113a5565b01610637565b8689517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b60019391928085036107bb5750505191825103610793576001929161078773ffffffffffffffffffffffffffffffffffffffff61078e935116916112bf565b51906113eb565b61071a565b878a517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b600195945090929190600281036107f057505073ffffffffffffffffffffffffffffffffffffffff61078e9251915116611693565b600314610800575b50505061071a565b73ffffffffffffffffffffffffffffffffffffffff6108249351915192511661177b565b3880806107f8565b60248d60218c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8d80fd5b8386517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b50346101715760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610171576108bc610ff2565b506108c561104b565b5067ffffffffffffffff9060443582811161030f576108e790369086016112a1565b5060643582811161030f576108ff90369086016112a1565b50608435918211610171575060209261091a91369101611185565b50517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8152f35b50913461021d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d576109d3610ff2565b9067ffffffffffffffff90602435828111610575576109f5903690830161101a565b92604435908111610a9f57610a0d903690840161101a565b939092865160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523389820152888152610a4b816110da565b5190205415610a78575091610a6a610a72926101f39695943691611253565b923691611253565b9161177b565b86517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5767ffffffffffffffff908035828111610c0457610af3903690830161101a565b91909260243590811161057557610b0d903690830161101a565b929091855160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523388820152878152610b4b816110da565b5190205415610bdd57818403610bb65750855b818110610b6a57868651f35b610b7581838761130f565b359073ffffffffffffffffffffffffffffffffffffffff82168203610bb257610bac600192610ba583888861130f565b35906113eb565b01610b5e565b8780fd5b85517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b85517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8480fd5b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5760209250610c4461104b565b73ffffffffffffffffffffffffffffffffffffffff835191858301933584521683820152828152610c74816110da565b5190205490519015158152f35b50913461021d57610c91366111cc565b909192845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523387820152868152610ccf816110da565b519020541561028f57506101f39291610ce9913691611253565b90611693565b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5780359073ffffffffffffffffffffffffffffffffffffffff821682036105795760243567ffffffffffffffff8111610c0457610d5e903690830161101a565b9091845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523387820152868152610d9b816110da565b519020541561028f57506101f39291610db591369161131f565b90611853565b50346101715760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017157610df3610ff2565b50610dfc61104b565b506064359067ffffffffffffffff82116101715750602092610e2091369101611185565b50517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57610e7f610ff2565b9060243567ffffffffffffffff8111610c0457610e9f903690830161101a565b9091845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338782015286815261026f816110da565b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f8152f35b9050833461021d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57357fffffffff00000000000000000000000000000000000000000000000000000000811680910361021d57602092507f4e2312e0000000000000000000000000000000000000000000000000000000008114908115610fc8575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610fc1565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b600080fd5b9181601f840112156110155782359167ffffffffffffffff8311611015576020808501948460051b01011161101557565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b6080810190811067ffffffffffffffff8211176110ab57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176110ab57604052565b67ffffffffffffffff81116110ab57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ab57604052565b67ffffffffffffffff81116110ab57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156110155780359061119c8261114b565b926111aa604051948561110a565b8284526020838301011161101557816000926020809301838601378301015290565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126110155760043573ffffffffffffffffffffffffffffffffffffffff8116810361101557916024359067ffffffffffffffff8211611015576112379160040161101a565b9091565b67ffffffffffffffff81116110ab5760051b60200190565b929161125e8261123b565b9161126c604051938461110a565b829481845260208094019160051b810192831161101557905b8282106112925750505050565b81358152908301908301611285565b9080601f83011215611015578160206112bc93359101611253565b90565b8051156112cc5760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156112cc5760209160051b010190565b91908110156112cc5760051b0190565b929161132a8261123b565b91611338604051938461110a565b829481845260208094019160051b810192831161101557905b82821061135e5750505050565b83809161136a8461106e565b815201910190611351565b3d156113a0573d906113868261114b565b91611394604051938461110a565b82523d6000602084013e565b606090565b600080809260405190335af16113b9611375565b50156113c157565b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b9061143791604051917fa9059cbb0000000000000000000000000000000000000000000000000000000060208401523360248401526044830152604482526114328261108f565b611439565b565b73ffffffffffffffffffffffffffffffffffffffff1690604051604081019080821067ffffffffffffffff8311176110ab576114b9916040526020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af16114b3611375565b91611571565b8051806114c7575b50505050565b8184918101031261030f578201519081159182150361017157506114ed578080806114c1565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919290156115ec5750815115611585575090565b3b1561158e5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156115ff5750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b84811061167c575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b81810183015186820160440152859350820161163b565b81519060005b8281106116a65750505050565b73ffffffffffffffffffffffffffffffffffffffff82166116c782866112fb565b51813b1561101557600080926064604093845195869384927f42842e0e00000000000000000000000000000000000000000000000000000000845230600485015233602485015260448401525af190811561173d5750906001929161172e575b5001611699565b611737906110f6565b38611727565b513d6000823e3d90fd5b90815180825260208080930193019160005b828110611767575050505090565b835185529381019392810192600101611759565b73ffffffffffffffffffffffffffffffffffffffff1691823b1561101557611821926000928360206117f0948260405198899788967f2eb2c2d600000000000000000000000000000000000000000000000000000000885230600489015233602489015260a0604489015260a4880190611747565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9384888303016064890152611747565b85810392830160848701525201925af180156118475761183e5750565b611437906110f6565b6040513d6000823e3d90fd5b90805191600091825b84811061186a575050505050565b806118d873ffffffffffffffffffffffffffffffffffffffff61188f600194866112fb565b5116604051907f095ea7b300000000000000000000000000000000000000000000000000000000602083015260248201526044878183015281526118d28161108f565b85611439565b0161185c565b81519060005b8281106118f15750505050565b73ffffffffffffffffffffffffffffffffffffffff8083169061191483876112fb565b5116813b1561101557600080926044604093845195869384927fa22cb46500000000000000000000000000000000000000000000000000000000845260048401528160248401525af190811561173d57509060019291611976575b50016118e4565b61197f906110f6565b3861196f56fea26469706673582212203f779f58fb8b4b7a79bb4189327c09725b7d991511fe9eb1080aadebb456f63a64736f6c63430008100033", + "deployedBytecode": "0x6080604081815260049182361015610022575b505050361561002057600080fd5b005b600090813560e01c90816301ffc9a714610f355750806307bd026514610edc5780630fe786e114610e47578063150b7a0214610dbb57806331b455a514610cef57806356255c5314610c8157806360d6c7cf14610c085780638a2685a914610aa3578063a4508b1f1461099a578063a6b520c014610941578063bc197c8114610884578063dedd65241461057d578063e1084a1314610313578063e58378bb146102b6578063e5cb370314610221578063f14210a6146101745763f23a6e610361001257346101715760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101715761011d610ff2565b5061012661104b565b506084359067ffffffffffffffff8211610171575060209261014a91369101611185565b50517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b80fd5b50913461021d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57815160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b825233848201528381526101e0816110da565b51902054156101f6576101f390356113a5565b51f35b90517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b50913461021d57610231366111cc565b909192845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338782015286815261026f816110da565b519020541561028f57506101f3929161028991369161131f565b906118de565b84517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8152f35b5080fd5b50913461021d576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105795767ffffffffffffffff823581811161057557610364903690850161101a565b92908551828101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b825233888201528781526103a0816110da565b519020541561054d579085929183516103b8816110da565b888152888382015260609485910152875b8581106103d557888851f35b8060051b8201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181121561054957820190858236031261054957885191610420836110da565b80358981101561054157835261043785820161106e565b908584019182528a81013590878211610545570136601f8201121561054157610466903690878135910161131f565b928a8101938452519289841015610515576001938085036104ab575073ffffffffffffffffffffffffffffffffffffffff6104a5925116905190611853565b016103c9565b600281036104dc575073ffffffffffffffffffffffffffffffffffffffff6104d79251169051906118de565b6104a5565b6003146104eb575b50506104a5565b73ffffffffffffffffffffffffffffffffffffffff61050e9251169051906118de565b38806104e4565b60248c60218c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8c80fd5b8980fd5b8486517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8380fd5b50913461021d57602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105795767ffffffffffffffff8135818111610575576105cf903690840161101a565b9390918551828101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338882015287815261060c816110da565b519020541561085c578551926106218461108f565b878452878385015260608085818a819801520152875b86811061064357888851f35b8060051b8201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112156105495782016080813603126105495788519061068e8261108f565b8035888110156105415782526106a586820161106e565b8683019081528a820135868111610545576106c390369084016112a1565b918b84019283528881013590878211610858576106e2913691016112a1565b9288810193845251918983101561082c578261074857505050516001815103610720579061071a6107146001936112bf565b516113a5565b01610637565b8689517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b60019391928085036107bb5750505191825103610793576001929161078773ffffffffffffffffffffffffffffffffffffffff61078e935116916112bf565b51906113eb565b61071a565b878a517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b600195945090929190600281036107f057505073ffffffffffffffffffffffffffffffffffffffff61078e9251915116611693565b600314610800575b50505061071a565b73ffffffffffffffffffffffffffffffffffffffff6108249351915192511661177b565b3880806107f8565b60248d60218c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8d80fd5b8386517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b50346101715760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610171576108bc610ff2565b506108c561104b565b5067ffffffffffffffff9060443582811161030f576108e790369086016112a1565b5060643582811161030f576108ff90369086016112a1565b50608435918211610171575060209261091a91369101611185565b50517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517fc3757b2598fc76eee6f032de6e0c1a33b52273c8afc630e889b8d170f8a26b1a8152f35b50913461021d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d576109d3610ff2565b9067ffffffffffffffff90602435828111610575576109f5903690830161101a565b92604435908111610a9f57610a0d903690840161101a565b939092865160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523389820152888152610a4b816110da565b5190205415610a78575091610a6a610a72926101f39695943691611253565b923691611253565b9161177b565b86517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5767ffffffffffffffff908035828111610c0457610af3903690830161101a565b91909260243590811161057557610b0d903690830161101a565b929091855160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523388820152878152610b4b816110da565b5190205415610bdd57818403610bb65750855b818110610b6a57868651f35b610b7581838761130f565b359073ffffffffffffffffffffffffffffffffffffffff82168203610bb257610bac600192610ba583888861130f565b35906113eb565b01610b5e565b8780fd5b85517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b85517f39218f3b000000000000000000000000000000000000000000000000000000008152fd5b8480fd5b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5760209250610c4461104b565b73ffffffffffffffffffffffffffffffffffffffff835191858301933584521683820152828152610c74816110da565b5190205490519015158152f35b50913461021d57610c91366111cc565b909192845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523387820152868152610ccf816110da565b519020541561028f57506101f39291610ce9913691611253565b90611693565b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d5780359073ffffffffffffffffffffffffffffffffffffffff821682036105795760243567ffffffffffffffff8111610c0457610d5e903690830161101a565b9091845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b82523387820152868152610d9b816110da565b519020541561028f57506101f39291610db591369161131f565b90611853565b50346101715760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017157610df3610ff2565b50610dfc61104b565b506064359067ffffffffffffffff82116101715750602092610e2091369101611185565b50517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b50913461021d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57610e7f610ff2565b9060243567ffffffffffffffff8111610c0457610e9f903690830161101a565b9091845160208101907f3fbe42dcb277543d3741131fe04ce9fb205e3b7154603a23a25efd63ed2c9e1b8252338782015286815261026f816110da565b50903461030f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030f57602090517fd931ed5eea9427443091b211e417e6f83bd1d1a5235f4e7adbb05b556120802f8152f35b9050833461021d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021d57357fffffffff00000000000000000000000000000000000000000000000000000000811680910361021d57602092507f4e2312e0000000000000000000000000000000000000000000000000000000008114908115610fc8575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610fc1565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b600080fd5b9181601f840112156110155782359167ffffffffffffffff8311611015576020808501948460051b01011161101557565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b359073ffffffffffffffffffffffffffffffffffffffff8216820361101557565b6080810190811067ffffffffffffffff8211176110ab57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176110ab57604052565b67ffffffffffffffff81116110ab57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ab57604052565b67ffffffffffffffff81116110ab57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156110155780359061119c8261114b565b926111aa604051948561110a565b8284526020838301011161101557816000926020809301838601378301015290565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126110155760043573ffffffffffffffffffffffffffffffffffffffff8116810361101557916024359067ffffffffffffffff8211611015576112379160040161101a565b9091565b67ffffffffffffffff81116110ab5760051b60200190565b929161125e8261123b565b9161126c604051938461110a565b829481845260208094019160051b810192831161101557905b8282106112925750505050565b81358152908301908301611285565b9080601f83011215611015578160206112bc93359101611253565b90565b8051156112cc5760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156112cc5760209160051b010190565b91908110156112cc5760051b0190565b929161132a8261123b565b91611338604051938461110a565b829481845260208094019160051b810192831161101557905b82821061135e5750505050565b83809161136a8461106e565b815201910190611351565b3d156113a0573d906113868261114b565b91611394604051938461110a565b82523d6000602084013e565b606090565b600080809260405190335af16113b9611375565b50156113c157565b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b9061143791604051917fa9059cbb0000000000000000000000000000000000000000000000000000000060208401523360248401526044830152604482526114328261108f565b611439565b565b73ffffffffffffffffffffffffffffffffffffffff1690604051604081019080821067ffffffffffffffff8311176110ab576114b9916040526020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af16114b3611375565b91611571565b8051806114c7575b50505050565b8184918101031261030f578201519081159182150361017157506114ed578080806114c1565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919290156115ec5750815115611585575090565b3b1561158e5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156115ff5750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b84811061167c575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b81810183015186820160440152859350820161163b565b81519060005b8281106116a65750505050565b73ffffffffffffffffffffffffffffffffffffffff82166116c782866112fb565b51813b1561101557600080926064604093845195869384927f42842e0e00000000000000000000000000000000000000000000000000000000845230600485015233602485015260448401525af190811561173d5750906001929161172e575b5001611699565b611737906110f6565b38611727565b513d6000823e3d90fd5b90815180825260208080930193019160005b828110611767575050505090565b835185529381019392810192600101611759565b73ffffffffffffffffffffffffffffffffffffffff1691823b1561101557611821926000928360206117f0948260405198899788967f2eb2c2d600000000000000000000000000000000000000000000000000000000885230600489015233602489015260a0604489015260a4880190611747565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9384888303016064890152611747565b85810392830160848701525201925af180156118475761183e5750565b611437906110f6565b6040513d6000823e3d90fd5b90805191600091825b84811061186a575050505050565b806118d873ffffffffffffffffffffffffffffffffffffffff61188f600194866112fb565b5116604051907f095ea7b300000000000000000000000000000000000000000000000000000000602083015260248201526044878183015281526118d28161108f565b85611439565b0161185c565b81519060005b8281106118f15750505050565b73ffffffffffffffffffffffffffffffffffffffff8083169061191483876112fb565b5116813b1561101557600080926044604093845195869384927fa22cb46500000000000000000000000000000000000000000000000000000000845260048401528160248401525af190811561173d57509060019291611976575b50016118e4565b61197f906110f6565b3861196f56fea26469706673582212203f779f58fb8b4b7a79bb4189327c09725b7d991511fe9eb1080aadebb456f63a64736f6c63430008100033", + "devdoc": { + "kind": "dev", + "methods": { + "onERC721Received(address,address,uint256,bytes)": { + "details": "See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/linea/solcInputs/6e9a09176756a7e15ef5f84545755d11.json b/deployments/linea/solcInputs/6e9a09176756a7e15ef5f84545755d11.json new file mode 100644 index 0000000..64862e4 --- /dev/null +++ b/deployments/linea/solcInputs/6e9a09176756a7e15ef5f84545755d11.json @@ -0,0 +1,243 @@ +{ + "language": "Solidity", + "sources": { + "@ensofinance/weiroll/contracts/CommandBuilder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nlibrary CommandBuilder {\n uint256 constant IDX_VARIABLE_LENGTH = 0x80;\n uint256 constant IDX_VALUE_MASK = 0x7f;\n uint256 constant IDX_END_OF_ARGS = 0xff;\n uint256 constant IDX_USE_STATE = 0xfe;\n uint256 constant IDX_ARRAY_START = 0xfd;\n uint256 constant IDX_TUPLE_START = 0xfc;\n uint256 constant IDX_DYNAMIC_END = 0xfb;\n\n function buildInputs(\n bytes[] memory state,\n bytes4 selector,\n bytes32 indices,\n uint256 indicesLength\n ) internal view returns (bytes memory ret) {\n uint256 idx; // The current command index\n uint256 offsetIdx; // The index of the current free offset\n\n uint256 count; // Number of bytes in whole ABI encoded message\n uint256 free; // Pointer to first free byte in tail part of message\n uint256[] memory dynamicLengths = new uint256[](10); // Optionally store the length of all dynamic types (a command cannot fit more than 10 dynamic types)\n\n bytes memory stateData; // Optionally encode the current state if the call requires it\n\n // Determine the length of the encoded data\n for (uint256 i; i < indicesLength; ) {\n idx = uint8(indices[i]);\n if (idx == IDX_END_OF_ARGS) {\n indicesLength = i;\n break;\n }\n if (idx & IDX_VARIABLE_LENGTH != 0) {\n if (idx == IDX_USE_STATE) {\n if (stateData.length == 0) {\n stateData = abi.encode(state);\n }\n unchecked {\n count += stateData.length;\n }\n } else {\n (dynamicLengths, offsetIdx, count, i) = setupDynamicType(\n state,\n indices,\n dynamicLengths,\n idx,\n offsetIdx,\n count,\n i\n );\n }\n } else {\n count = setupStaticVariable(state, count, idx);\n }\n unchecked {\n free += 32;\n ++i;\n }\n }\n\n // Encode it\n ret = new bytes(count + 4);\n assembly {\n mstore(add(ret, 32), selector)\n }\n offsetIdx = 0;\n // Use count to track current memory slot\n assembly {\n count := add(ret, 36)\n }\n for (uint256 i; i < indicesLength; ) {\n idx = uint8(indices[i]);\n if (idx & IDX_VARIABLE_LENGTH != 0) {\n if (idx == IDX_USE_STATE) {\n assembly {\n mstore(count, free)\n }\n memcpy(stateData, 32, ret, free + 4, stateData.length - 32);\n unchecked {\n free += stateData.length - 32;\n }\n } else if (idx == IDX_ARRAY_START) {\n // Start of dynamic type, put pointer in current slot\n assembly {\n mstore(count, free)\n }\n (offsetIdx, free, i, ) = encodeDynamicArray(\n ret,\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n free,\n i\n );\n } else if (idx == IDX_TUPLE_START) {\n // Start of dynamic type, put pointer in current slot\n assembly {\n mstore(count, free)\n }\n (offsetIdx, free, i, ) = encodeDynamicTuple(\n ret,\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n free,\n i\n );\n } else {\n // Variable length data\n uint256 argLen = state[idx & IDX_VALUE_MASK].length;\n // Put a pointer in the current slot and write the data to first free slot\n assembly {\n mstore(count, free)\n }\n memcpy(\n state[idx & IDX_VALUE_MASK],\n 0,\n ret,\n free + 4,\n argLen\n );\n unchecked {\n free += argLen;\n }\n }\n } else {\n // Fixed length data (length previously checked to be 32 bytes)\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\n // Write the data to current slot\n assembly {\n mstore(count, mload(add(stateVar, 32)))\n }\n }\n unchecked {\n count += 32;\n ++i;\n }\n }\n }\n\n function setupStaticVariable(\n bytes[] memory state,\n uint256 count,\n uint256 idx\n ) internal pure returns (uint256 newCount) {\n require(\n state[idx & IDX_VALUE_MASK].length == 32,\n \"Static state variables must be 32 bytes\"\n );\n unchecked {\n newCount = count + 32;\n }\n }\n\n function setupDynamicVariable(\n bytes[] memory state,\n uint256 count,\n uint256 idx\n ) internal pure returns (uint256 newCount) {\n bytes memory arg = state[idx & IDX_VALUE_MASK];\n // Validate the length of the data in state is a multiple of 32\n uint256 argLen = arg.length;\n require(\n argLen != 0 && argLen % 32 == 0,\n \"Dynamic state variables must be a multiple of 32 bytes\"\n );\n // Add the length of the value, rounded up to the next word boundary, plus space for pointer\n unchecked {\n newCount = count + argLen + 32;\n }\n }\n\n function setupDynamicType(\n bytes[] memory state,\n bytes32 indices,\n uint256[] memory dynamicLengths,\n uint256 idx,\n uint256 offsetIdx,\n uint256 count,\n uint256 index\n ) internal view returns (\n uint256[] memory newDynamicLengths,\n uint256 newOffsetIdx,\n uint256 newCount,\n uint256 newIndex\n ) {\n if (idx == IDX_ARRAY_START) {\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicArray(\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n count,\n index\n );\n } else if (idx == IDX_TUPLE_START) {\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicTuple(\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n count,\n index\n );\n } else {\n newDynamicLengths = dynamicLengths;\n newOffsetIdx = offsetIdx;\n newIndex = index;\n newCount = setupDynamicVariable(state, count, idx);\n }\n }\n\n function setupDynamicArray(\n bytes[] memory state,\n bytes32 indices,\n uint256[] memory dynamicLengths,\n uint256 offsetIdx,\n uint256 count,\n uint256 index\n ) internal view returns (\n uint256[] memory newDynamicLengths,\n uint256 newOffsetIdx,\n uint256 newCount,\n uint256 newIndex\n ) {\n // Current idx is IDX_ARRAY_START, next idx will contain the array length\n unchecked {\n newIndex = index + 1;\n newCount = count + 32;\n }\n uint256 idx = uint8(indices[newIndex]);\n require(\n state[idx & IDX_VALUE_MASK].length == 32,\n \"Array length must be 32 bytes\"\n );\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicTuple(\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n newCount,\n newIndex\n );\n }\n\n function setupDynamicTuple(\n bytes[] memory state,\n bytes32 indices,\n uint256[] memory dynamicLengths,\n uint256 offsetIdx,\n uint256 count,\n uint256 index\n ) internal view returns (\n uint256[] memory newDynamicLengths,\n uint256 newOffsetIdx,\n uint256 newCount,\n uint256 newIndex\n ) {\n uint256 idx;\n uint256 offset;\n newDynamicLengths = dynamicLengths;\n // Progress to first index of the data and progress the next offset idx\n unchecked {\n newIndex = index + 1;\n newOffsetIdx = offsetIdx + 1;\n newCount = count + 32;\n }\n while (newIndex < 32) {\n idx = uint8(indices[newIndex]);\n if (idx & IDX_VARIABLE_LENGTH != 0) {\n if (idx == IDX_DYNAMIC_END) {\n newDynamicLengths[offsetIdx] = offset;\n // explicit return saves gas ¯\\_(ツ)_/¯\n return (newDynamicLengths, newOffsetIdx, newCount, newIndex);\n } else {\n require(idx != IDX_USE_STATE, \"Cannot use state from inside dynamic type\");\n (newDynamicLengths, newOffsetIdx, newCount, newIndex) = setupDynamicType(\n state,\n indices,\n newDynamicLengths,\n idx,\n newOffsetIdx,\n newCount,\n newIndex\n );\n }\n } else {\n newCount = setupStaticVariable(state, newCount, idx);\n }\n unchecked {\n offset += 32;\n ++newIndex;\n }\n }\n revert(\"Dynamic type was not properly closed\");\n }\n\n function encodeDynamicArray(\n bytes memory ret,\n bytes[] memory state,\n bytes32 indices,\n uint256[] memory dynamicLengths,\n uint256 offsetIdx,\n uint256 currentSlot,\n uint256 index\n ) internal view returns (\n uint256 newOffsetIdx,\n uint256 newSlot,\n uint256 newIndex,\n uint256 length\n ) {\n // Progress to array length metadata\n unchecked {\n newIndex = index + 1;\n newSlot = currentSlot + 32;\n }\n // Encode array length\n uint256 idx = uint8(indices[newIndex]);\n // Array length value previously checked to be 32 bytes\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\n assembly {\n mstore(add(add(ret, 36), currentSlot), mload(add(stateVar, 32)))\n }\n (newOffsetIdx, newSlot, newIndex, length) = encodeDynamicTuple(\n ret,\n state,\n indices,\n dynamicLengths,\n offsetIdx,\n newSlot,\n newIndex\n );\n unchecked {\n length += 32; // Increase length to account for array length metadata\n }\n }\n\n function encodeDynamicTuple(\n bytes memory ret,\n bytes[] memory state,\n bytes32 indices,\n uint256[] memory dynamicLengths,\n uint256 offsetIdx,\n uint256 currentSlot,\n uint256 index\n ) internal view returns (\n uint256 newOffsetIdx,\n uint256 newSlot,\n uint256 newIndex,\n uint256 length\n ) {\n uint256 idx;\n uint256 argLen;\n uint256 freePointer = dynamicLengths[offsetIdx]; // The pointer to the next free slot\n unchecked {\n newSlot = currentSlot + freePointer; // Update the next slot\n newOffsetIdx = offsetIdx + 1; // Progress to next offsetIdx\n newIndex = index + 1; // Progress to first index of the data\n }\n // Shift currentSlot to correct location in memory\n assembly {\n currentSlot := add(add(ret, 36), currentSlot)\n }\n while (newIndex < 32) {\n idx = uint8(indices[newIndex]);\n if (idx & IDX_VARIABLE_LENGTH != 0) {\n if (idx == IDX_DYNAMIC_END) {\n break;\n } else if (idx == IDX_ARRAY_START) {\n // Start of dynamic type, put pointer in current slot\n assembly {\n mstore(currentSlot, freePointer)\n }\n (newOffsetIdx, newSlot, newIndex, argLen) = encodeDynamicArray(\n ret,\n state,\n indices,\n dynamicLengths,\n newOffsetIdx,\n newSlot,\n newIndex\n );\n unchecked {\n freePointer += argLen;\n length += (argLen + 32); // data + pointer\n }\n } else if (idx == IDX_TUPLE_START) {\n // Start of dynamic type, put pointer in current slot\n assembly {\n mstore(currentSlot, freePointer)\n }\n (newOffsetIdx, newSlot, newIndex, argLen) = encodeDynamicTuple(\n ret,\n state,\n indices,\n dynamicLengths,\n newOffsetIdx,\n newSlot,\n newIndex\n );\n unchecked {\n freePointer += argLen;\n length += (argLen + 32); // data + pointer\n }\n } else {\n // Variable length data\n argLen = state[idx & IDX_VALUE_MASK].length;\n // Start of dynamic type, put pointer in current slot\n assembly {\n mstore(currentSlot, freePointer)\n }\n memcpy(\n state[idx & IDX_VALUE_MASK],\n 0,\n ret,\n newSlot + 4,\n argLen\n );\n unchecked {\n newSlot += argLen;\n freePointer += argLen;\n length += (argLen + 32); // data + pointer\n }\n }\n } else {\n // Fixed length data (length previously checked to be 32 bytes)\n bytes memory stateVar = state[idx & IDX_VALUE_MASK];\n // Write to first free slot\n assembly {\n mstore(currentSlot, mload(add(stateVar, 32)))\n }\n unchecked {\n length += 32;\n }\n }\n unchecked {\n currentSlot += 32;\n ++newIndex;\n }\n }\n }\n\n function writeOutputs(\n bytes[] memory state,\n bytes1 index,\n bytes memory output\n ) internal pure returns (bytes[] memory) {\n uint256 idx = uint8(index);\n if (idx == IDX_END_OF_ARGS) return state;\n\n if (idx & IDX_VARIABLE_LENGTH != 0) {\n if (idx == IDX_USE_STATE) {\n state = abi.decode(output, (bytes[]));\n } else {\n require(idx & IDX_VALUE_MASK < state.length, \"Index out-of-bounds\");\n // Check the first field is 0x20 (because we have only a single return value)\n uint256 argPtr;\n assembly {\n argPtr := mload(add(output, 32))\n }\n require(\n argPtr == 32,\n \"Only one return value permitted (variable)\"\n );\n\n assembly {\n // Overwrite the first word of the return data with the length - 32\n mstore(add(output, 32), sub(mload(output), 32))\n // Insert a pointer to the return data, starting at the second word, into state\n mstore(\n add(add(state, 32), mul(and(idx, IDX_VALUE_MASK), 32)),\n add(output, 32)\n )\n }\n }\n } else {\n require(idx & IDX_VALUE_MASK < state.length, \"Index out-of-bounds\");\n // Single word\n require(\n output.length == 32,\n \"Only one return value permitted (static)\"\n );\n\n state[idx & IDX_VALUE_MASK] = output;\n }\n\n return state;\n }\n\n function writeTuple(\n bytes[] memory state,\n bytes1 index,\n bytes memory output\n ) internal view {\n uint256 idx = uint8(index);\n if (idx == IDX_END_OF_ARGS) return;\n\n bytes memory entry = state[idx & IDX_VALUE_MASK] = new bytes(output.length + 32);\n memcpy(output, 0, entry, 32, output.length);\n assembly {\n let l := mload(output)\n mstore(add(entry, 32), l)\n }\n }\n\n function memcpy(\n bytes memory src,\n uint256 srcIdx,\n bytes memory dest,\n uint256 destIdx,\n uint256 len\n ) internal view {\n assembly {\n pop(\n staticcall(\n gas(),\n 4,\n add(add(src, 32), srcIdx),\n len,\n add(add(dest, 32), destIdx),\n len\n )\n )\n }\n }\n}\n" + }, + "@ensofinance/weiroll/contracts/VM.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nimport \"./CommandBuilder.sol\";\n\nabstract contract VM {\n using CommandBuilder for bytes[];\n\n uint256 constant FLAG_CT_DELEGATECALL = 0x00; // Delegate call not currently supported\n uint256 constant FLAG_CT_CALL = 0x01;\n uint256 constant FLAG_CT_STATICCALL = 0x02;\n uint256 constant FLAG_CT_VALUECALL = 0x03;\n uint256 constant FLAG_CT_MASK = 0x03;\n uint256 constant FLAG_DATA = 0x20;\n uint256 constant FLAG_EXTENDED_COMMAND = 0x40;\n uint256 constant FLAG_TUPLE_RETURN = 0x80;\n\n uint256 constant SHORT_COMMAND_FILL =\n 0x000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\n\n error ExecutionFailed(\n uint256 command_index,\n address target,\n string message\n );\n\n function _execute(bytes32[] calldata commands, bytes[] memory state)\n internal\n returns (bytes[] memory)\n {\n bytes32 command;\n uint256 flags;\n bytes32 indices;\n\n bool success;\n bytes memory outData;\n\n uint256 commandsLength = commands.length;\n uint256 indicesLength;\n for (uint256 i; i < commandsLength; i = _uncheckedIncrement(i)) {\n command = commands[i];\n flags = uint256(uint8(bytes1(command << 32)));\n\n if (flags & FLAG_EXTENDED_COMMAND != 0) {\n i = _uncheckedIncrement(i);\n indices = commands[i];\n indicesLength = 32;\n } else {\n indices = bytes32(uint256(command << 40) | SHORT_COMMAND_FILL);\n indicesLength = 6;\n }\n\n if (flags & FLAG_CT_MASK == FLAG_CT_CALL) {\n (success, outData) = address(uint160(uint256(command))).call( // target\n // inputs\n flags & FLAG_DATA == 0\n ? state.buildInputs(\n bytes4(command), // selector\n indices,\n indicesLength\n )\n : state[\n uint8(bytes1(indices)) &\n CommandBuilder.IDX_VALUE_MASK\n ]\n );\n } else if (flags & FLAG_CT_MASK == FLAG_CT_STATICCALL) {\n (success, outData) = address(uint160(uint256(command))) // target\n .staticcall(\n // inputs\n flags & FLAG_DATA == 0\n ? state.buildInputs(\n bytes4(command), // selector\n indices,\n indicesLength\n )\n : state[\n uint8(bytes1(indices)) &\n CommandBuilder.IDX_VALUE_MASK\n ]\n );\n } else if (flags & FLAG_CT_MASK == FLAG_CT_VALUECALL) {\n bytes memory v = state[\n uint8(bytes1(indices)) &\n CommandBuilder.IDX_VALUE_MASK\n ];\n require(v.length == 32, \"Value must be 32 bytes\");\n uint256 callEth = uint256(bytes32(v));\n (success, outData) = address(uint160(uint256(command))).call{ // target\n value: callEth\n }(\n // inputs\n flags & FLAG_DATA == 0\n ? state.buildInputs(\n bytes4(command), // selector\n indices << 8, // skip value input\n indicesLength - 1 // max indices length reduced by value input\n )\n : state[\n uint8(bytes1(indices << 8)) & // first byte after value input\n CommandBuilder.IDX_VALUE_MASK\n ]\n );\n } else {\n revert(\"Invalid calltype\");\n }\n\n if (!success) {\n string memory message = \"Unknown\";\n if (outData.length > 68) {\n // This might be an error message, parse the outData\n // Estimate the bytes length of the possible error message\n uint256 estimatedLength = _estimateBytesLength(outData, 68);\n // Remove selector. First 32 bytes should be a pointer that indicates the start of data in memory\n assembly {\n outData := add(outData, 4)\n }\n uint256 pointer = uint256(bytes32(outData));\n if (pointer == 32) {\n // Remove pointer. If it is a string, the next 32 bytes will hold the size\n assembly {\n outData := add(outData, 32)\n }\n uint256 size = uint256(bytes32(outData));\n // If the size variable is the same as the estimated bytes length, we can be fairly certain\n // this is a dynamic string, so convert the bytes to a string and emit the message. While an\n // error function with 3 static parameters is capable of producing a similar output, there is\n // low risk of a contract unintentionally emitting a message.\n if (size == estimatedLength) {\n // Remove size. The remaining data should be the string content\n assembly {\n outData := add(outData, 32)\n }\n message = string(outData);\n }\n }\n }\n revert ExecutionFailed({\n command_index: flags & FLAG_EXTENDED_COMMAND == 0\n ? i\n : i - 1,\n target: address(uint160(uint256(command))),\n message: message\n });\n }\n\n if (flags & FLAG_TUPLE_RETURN != 0) {\n state.writeTuple(bytes1(command << 88), outData);\n } else {\n state = state.writeOutputs(bytes1(command << 88), outData);\n }\n }\n return state;\n }\n\n function _estimateBytesLength(bytes memory data, uint256 pos) internal pure returns (uint256 estimate) {\n uint256 length = data.length;\n estimate = length - pos; // Assume length equals alloted space\n for (uint256 i = pos; i < length; ) {\n if (data[i] == 0) {\n // Zero bytes found, adjust estimated length\n estimate = i - pos;\n break;\n }\n unchecked {\n ++i;\n }\n }\n }\n\n function _uncheckedIncrement(uint256 i) private pure returns (uint256) {\n unchecked {\n ++i;\n }\n return i;\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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" + }, + "@openzeppelin/contracts/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" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 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(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\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" + }, + "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\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. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"./extensions/IERC1155MetadataURI.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping(uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /**\n * @dev See {_setURI}.\n */\n constructor(string memory uri_) {\n _setURI(uri_);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC1155).interfaceId ||\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) public view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: address zero is not a valid owner\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n _safeTransferFrom(from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner or approved\"\n );\n _safeBatchTransferFrom(from, to, ids, amounts, data);\n }\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 * - `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(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\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 * - 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[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\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 _mintBatch(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] += amounts[i];\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `from`\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `from` must have at least `amount` tokens of token type `id`.\n */\n function _burn(\n address from,\n uint256 id,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n\n emit TransferSingle(operator, from, address(0), id, amount);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(\n address from,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n for (uint256 i = 0; i < ids.length; i++) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n }\n\n emit TransferBatch(operator, from, address(0), ids, amounts);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC1155: setting approval status for self\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver.onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non-ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n bytes4 response\n ) {\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non-ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\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(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n 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(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) 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/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value The amount of tokens being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155Receiver.sol\";\n\n/**\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\n *\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\n * stuck.\n *\n * @dev _Available since v3.1._\n */\ncontract ERC1155Holder is ERC1155Receiver {\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes memory\n ) public virtual override returns (bytes4) {\n return this.onERC1155Received.selector;\n }\n\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] memory,\n uint256[] memory,\n bytes memory\n ) public virtual override returns (bytes4) {\n return this.onERC1155BatchReceived.selector;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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 IERC20Permit {\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/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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 IERC20 {\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(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.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 SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) 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(\n IERC20 token,\n address spender,\n uint256 value\n ) 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 function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit 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(IERC20 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 if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\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 `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 _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _ownerOf(tokenId) != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\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 _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256, /* firstTokenId */\n uint256 batchSize\n ) internal virtual {\n if (batchSize > 1) {\n if (from != address(0)) {\n _balances[from] -= batchSize;\n }\n if (to != address(0)) {\n _balances[to] += batchSize;\n }\n }\n }\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 firstTokenId,\n uint256 batchSize\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\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(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) 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(\n address from,\n address to,\n uint256 tokenId\n ) 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(\n address from,\n address to,\n uint256 tokenId\n ) 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/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Receiver.sol\";\n\n/**\n * @dev Implementation of the {IERC721Receiver} interface.\n *\n * Accepts all token transfers.\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\n */\ncontract ERC721Holder is IERC721Receiver {\n /**\n * @dev See {IERC721Receiver-onERC721Received}.\n *\n * Always returns `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address,\n address,\n uint256,\n bytes memory\n ) public virtual override returns (bytes4) {\n return this.onERC721Received.selector;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 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(\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 (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/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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 Context {\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" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // 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(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) 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(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) 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(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) 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(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.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 ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\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" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "contracts/access/AccessController.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"./ACL.sol\";\nimport \"./Roles.sol\";\n\n// @notice The OWNER_ROLE must be set in the importing contract's constructor or initialize function\nabstract contract AccessController is ACL, Roles {\n using StorageAPI for bytes32;\n\n event PermissionSet(bytes32 role, address account, bool permission);\n\n error UnsafeSetting();\n error InvalidAccount();\n\n // @notice Sets user permission over a role\n // @param role The bytes32 value of the role\n // @param account The address of the account\n // @param permission The permission status\n function setPermission(\n bytes32 role,\n address account,\n bool permission\n ) external isPermitted(OWNER_ROLE) {\n if (account == address(0)) revert InvalidAccount();\n if (role == OWNER_ROLE && account == msg.sender && permission == false)\n revert UnsafeSetting();\n _setPermission(role, account, permission);\n }\n\n // @notice Internal function to set user permission over a role\n // @param role The bytes32 value of the role\n // @param account The address of the account\n // @param permission The permission status\n function _setPermission(bytes32 role, address account, bool permission) internal {\n bytes32 key = _getKey(role, account);\n key.setBool(permission);\n emit PermissionSet(role, account, permission);\n }\n}\n" + }, + "contracts/access/ACL.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../libraries/StorageAPI.sol\";\n\nabstract contract ACL {\n using StorageAPI for bytes32;\n\n error NotPermitted();\n\n modifier isPermitted(bytes32 role) {\n bool permitted = _getPermission(role, msg.sender); // TODO: support GSN/Account abstraction\n if (!permitted) revert NotPermitted();\n _;\n }\n\n // @notice Gets user permission for a role\n // @param role The bytes32 value of the role\n // @param account The address of the account\n // @return The permission status\n function getPermission(bytes32 role, address account) external view returns (bool) {\n return _getPermission(role, account);\n }\n\n // @notice Internal function to get user permission for a role\n // @param role The bytes32 value of the role\n // @param account The address of the account\n // @return The permission status\n function _getPermission(bytes32 role, address account) internal view returns (bool) {\n bytes32 key = _getKey(role, account);\n return key.getBool();\n }\n\n // @notice Internal function to get the key for the storage slot\n // @param role The bytes32 value of the role\n // @param account The address of the account\n // @return The bytes32 storage slot\n function _getKey(bytes32 role, address account) internal pure returns (bytes32) {\n return keccak256(abi.encode(role, account));\n }\n}\n" + }, + "contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../libraries/StorageAPI.sol\";\n\n// @notice The OWNER slot must be set in the importing contract's constructor or initialize function\nabstract contract Ownable {\n using StorageAPI for bytes32;\n\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\n bytes32 internal constant OWNER = bytes32(uint256(keccak256(\"enso.access.owner\")) - 1);\n bytes32 internal constant PENDING_OWNER = bytes32(uint256(keccak256(\"enso.access.pendingOwner\")) - 1);\n\n event OwnershipTransferred(address previousOwner, address newOwner);\n event OwnershipTransferStarted(address previousOwner, address newOwner);\n\n error NotOwner();\n error NotPermitted();\n error InvalidAccount();\n\n modifier onlyOwner() {\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\n _;\n }\n\n // @notice Transfer ownership of this contract, ownership is only transferred after new owner accepts\n // @param newOwner The address of the new owner\n function transferOwnership(address newOwner) external onlyOwner {\n if (newOwner == address(0)) revert InvalidAccount();\n address currentOwner = OWNER.getAddress();\n if (newOwner == currentOwner) revert InvalidAccount();\n PENDING_OWNER.setAddress(newOwner);\n emit OwnershipTransferStarted(currentOwner, newOwner);\n }\n\n // @notice Accept ownership of this contract\n function acceptOwnership() external {\n if (msg.sender != PENDING_OWNER.getAddress()) revert NotPermitted();\n PENDING_OWNER.setAddress(address(0));\n address previousOwner = OWNER.getAddress();\n OWNER.setAddress(msg.sender);\n emit OwnershipTransferred(previousOwner, msg.sender);\n }\n\n // @notice The current owner of this contract\n // @return The address of the current owner\n function owner() external view returns (address) {\n return OWNER.getAddress();\n }\n}\n" + }, + "contracts/access/Roles.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nabstract contract Roles {\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\n bytes32 public constant OWNER_ROLE = bytes32(uint256(keccak256(\"enso.access.roles.owner\")) - 1);\n bytes32 public constant EXECUTOR_ROLE = bytes32(uint256(keccak256(\"enso.access.roles.executor\")) - 1);\n bytes32 public constant MODULE_ROLE = bytes32(uint256(keccak256(\"enso.access.roles.module\")) - 1);\n}" + }, + "contracts/access/Timelock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\n\nabstract contract Timelock {\n\n uint256 constant public UNSET_TIMESTAMP = 1;\n bytes constant public UNSET_VALUE = new bytes(0x01); \n\n uint256 public delay;\n mapping(bytes32 => TimelockData) public timelockData;\n\n struct TimelockData {\n uint256 timestamp;\n bytes value;\n }\n \n error NoTimelock();\n error Wait();\n\n // @notice Internal function to initiate a timelock\n // @param key The bytes32 key that represents the function that is timelocked\n // @param value The bytes value that is stored until the timelock completes\n function _startTimelock(bytes32 key, bytes memory value) internal {\n TimelockData storage td = timelockData[key]; \n td.timestamp = block.timestamp;\n td.value = value;\n }\n\n // @notice Internal function to check the current status of a timelock and revert if the timelock has not matured\n // @param key The bytes32 key that represents the function that is timelocked\n function _checkTimelock(bytes32 key) internal view {\n TimelockData memory td = timelockData[key]; \n if (td.timestamp < 2) revert NoTimelock();\n if (block.timestamp < td.timestamp + delay) revert Wait();\n }\n\n // @notice Internal function to view the value stored for a timelock\n // @return The bytes value that is stored until the timelock completes\n function _getTimelockValue(bytes32 key) internal view returns(bytes memory) {\n return timelockData[key].value; \n }\n\n // @notice Reset the timelock\n // @param key The bytes32 key that represents the function that is timelocked\n function _resetTimelock(bytes32 key) internal {\n TimelockData storage td = timelockData[key];\n // By not deleting TimelockData, we save gas on subsequent actions\n td.timestamp = UNSET_TIMESTAMP; \n td.value = UNSET_VALUE;\n }\n}" + }, + "contracts/deployer/FactoryDeployer.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../EnsoWalletFactory.sol\";\nimport \"../proxy/UpgradeableProxy.sol\";\n\ncontract FactoryDeployer {\n address public immutable factory;\n\n constructor(address owner, address factoryImplementation) {\n factory = address(new UpgradeableProxy(factoryImplementation));\n EnsoWalletFactory(factory).initialize(owner);\n }\n}" + }, + "contracts/EnsoBeacon.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nimport \"./interfaces/IBeacon.sol\";\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IUUPS.sol\";\nimport \"./access/Timelock.sol\";\n\ncontract EnsoBeacon is IBeacon, Timelock {\n\n uint256 constant public MAX_DELAY = 2419200; // 4 weeks\n\n address public admin;\n address public delegate;\n address public factory;\n address public coreImplementation;\n address public fallbackImplementation;\n\n address public pendingAdmin;\n address public pendingDelegate;\n\n event CoreUpgraded(address previousImplementation, address newImplementation, bool finalized);\n event FallbackUpgraded(address previousImplementation, address newImplementation, bool finalized);\n event EmergencyUpgrade();\n event AdministrationTransferred(address previousAdmin, address newAdmin);\n event AdministrationTransferStarted(address previousAdmin, address newAdmin);\n event DelegationTransferred(address previousDelegate, address newDelegate);\n event DelegationTransferStarted(address previousDelegate, address newDelegate);\n event Delay(uint256 newDelay, bool finalized);\n\n error InvalidImplementation();\n error InvalidAccount();\n error InvalidDelay();\n error NotPermitted();\n error FactorySet();\n\n modifier onlyAdmin() {\n if (msg.sender != admin) revert NotPermitted();\n _;\n }\n\n modifier onlyDelegate() {\n if (msg.sender != delegate) revert NotPermitted();\n _;\n }\n\n constructor(address admin_, address coreImplementation_, address fallbackImplementation_) {\n admin = admin_;\n delegate = admin_;\n coreImplementation = coreImplementation_;\n fallbackImplementation = fallbackImplementation_;\n }\n\n // @notice The current core implementation\n // @dev Called by proxy contracts to get the implementation address\n function implementation() external view override returns (address) {\n return coreImplementation;\n }\n\n // @notice Switch from the core implementation to the fallback implementation\n function emergencyUpgrade() external onlyDelegate {\n _upgradeCore(fallbackImplementation);\n emit EmergencyUpgrade();\n }\n\n // @notice Initialize an upgrade to a new core implementation\n // @param newImplementation The address of the new core implementation\n // @param factoryImplementation Optionally include a new factory implementation to upgrade the factory simultaneously. Pass zero address if no upgrade is needed\n // @param factoryUpgradeData Calldata for upgrading the new factory. Pass zero bytes if factory is not being upgraded or no additional call needs to be made\n function upgradeCore(\n address newImplementation,\n address factoryImplementation,\n bytes memory factoryUpgradeData\n ) external onlyAdmin {\n address currentImplementation = coreImplementation;\n if (newImplementation == address(0)) revert InvalidImplementation();\n if (newImplementation == currentImplementation) revert InvalidImplementation();\n bytes32 key = this.upgradeCore.selector;\n bytes memory data = abi.encode(newImplementation, factoryImplementation, factoryUpgradeData);\n _startTimelock(key, data);\n emit CoreUpgraded(currentImplementation, newImplementation, false);\n }\n\n // @notice Finalize the new core implementation\n function finalizeCore() external {\n // Resolve timelock\n bytes32 key = this.upgradeCore.selector;\n (address newImplementation, address factoryImplementation, bytes memory factoryUpgradeData) = abi.decode(\n _resolveTimelock(key), (address, address, bytes)\n );\n // Upgrade\n _upgradeCore(newImplementation);\n if (factoryImplementation != address(0)) _upgradeFactory(factoryImplementation, factoryUpgradeData);\n }\n\n // @notice Initialize an upgrade to a new fallback implementation\n // @param newImplementation The address of the new fallback implementation\n function upgradeFallback(address newImplementation) external onlyAdmin {\n address currentImplementation = fallbackImplementation;\n if (newImplementation == address(0)) revert InvalidImplementation();\n if (newImplementation == currentImplementation) revert InvalidImplementation();\n bytes32 key = this.upgradeFallback.selector;\n bytes memory data = abi.encode(newImplementation);\n _startTimelock(key, data);\n emit FallbackUpgraded(currentImplementation, newImplementation, false);\n }\n\n // @notice Finalize the new fallback implementation\n function finalizeFallback() external {\n // Resolve timelock\n bytes32 key = this.upgradeFallback.selector;\n (address newImplementation) = abi.decode(\n _resolveTimelock(key), (address)\n );\n // Upgrade\n if (newImplementation == address(0)) revert InvalidImplementation(); // sanity check\n address previousImplementation = fallbackImplementation;\n fallbackImplementation = newImplementation;\n emit FallbackUpgraded(previousImplementation, newImplementation, true);\n }\n\n // @notice Upgrade the factory implementation\n // @param newImplementation The address of the new factory implementation\n // @param data Calldata for upgrading the new factory. Pass zero bytes if no additional call needs to be made\n function upgradeFactory(address newImplementation, bytes memory data) external onlyAdmin {\n if (newImplementation == address(0)) revert InvalidImplementation();\n _upgradeFactory(newImplementation, data);\n }\n\n // @notice Initiate transfer of the admin role\n // @notice newAdmin The address of the new admin\n function transferAdministration(address newAdmin) external onlyAdmin {\n if (newAdmin == address(0)) revert InvalidAccount();\n if (newAdmin == admin) revert InvalidAccount();\n pendingAdmin = newAdmin;\n emit AdministrationTransferStarted(admin, newAdmin);\n }\n\n // @notice Accept new admin role\n // @dev Only the pending admin can call this function\n function acceptAdministration() external {\n if (msg.sender != pendingAdmin) revert NotPermitted();\n delete pendingAdmin;\n address previousAdmin = admin;\n admin = msg.sender;\n emit AdministrationTransferred(previousAdmin, msg.sender);\n }\n\n // @notice Renounce admin role. No upgrades can be done if this function is called.\n // @dev This function renounces both the admin and the delegate roles.\n function renounceAdministration() external onlyAdmin {\n address previousAdmin = admin;\n address previousDelegate = delegate;\n delete admin;\n delete delegate;\n delete pendingAdmin;\n delete pendingDelegate;\n emit AdministrationTransferred(previousAdmin, address(0));\n emit DelegationTransferred(previousDelegate, address(0));\n }\n\n // @notice Initiate transfer of the delegate role\n // @notice newDelegate The address of the new delegate\n function transferDelegation(address newDelegate) external onlyAdmin {\n if (newDelegate == address(0)) revert InvalidAccount();\n if (newDelegate == delegate) revert InvalidAccount();\n pendingDelegate = newDelegate;\n emit DelegationTransferStarted(delegate, newDelegate);\n }\n\n // @notice Accept new delegate role\n // @dev Only the pending delegate can call this function\n function acceptDelegation() external {\n if (msg.sender != pendingDelegate) revert NotPermitted();\n delete pendingDelegate;\n address previousDelegate = delegate;\n delegate = msg.sender;\n emit DelegationTransferred(previousDelegate, msg.sender);\n }\n\n // @notice Renounce delegate role. Emergency upgrades cannot happen while this role remain unfilled.\n // @dev The admin can always give this role to another address with the transferDelegation function\n function renounceDelegation() external onlyDelegate {\n address previousDelegate = delegate;\n delete delegate;\n emit DelegationTransferred(previousDelegate, address(0));\n }\n\n // @notice Transfer ownership of a contract that is owned by this contract\n // @param ownable The address of the contract that is getting it's ownership transferred\n // @param newOwner The address of the new owner\n function transferOwnership(address ownable, address newOwner) external onlyAdmin {\n IOwnable(ownable).transferOwnership(newOwner);\n }\n\n // @notice Accept ownership of another contract by this contract\n // @param ownable The address of the contract that is getting it's ownership transferred\n function acceptOwnership(address ownable) external onlyAdmin {\n IOwnable(ownable).acceptOwnership();\n }\n\n // @notice Set the factory address. Once set, the factory cannot be changed\n // @param newFactory The address of the new factory\n function setFactory(address newFactory) external onlyAdmin {\n if (factory != address(0)) revert FactorySet();\n if (newFactory == address(0)) revert InvalidAccount();\n factory = newFactory;\n }\n\n // @notice Initiate an update of the delay value\n // @param newDelay The new delay in seconds\n function updateDelay(uint256 newDelay) external onlyAdmin {\n if (newDelay > MAX_DELAY) revert InvalidDelay();\n // Set timelock\n bytes32 key = this.updateDelay.selector;\n bytes memory data = abi.encode(newDelay);\n _startTimelock(key, data);\n emit Delay(newDelay, false);\n }\n\n // @notice Finalize the delay in state\n function finalizeDelay() external {\n // Resolve timelock\n bytes32 key = this.updateDelay.selector;\n (uint256 newDelay) = abi.decode(\n _resolveTimelock(key), (uint256)\n );\n if (newDelay > MAX_DELAY) revert InvalidDelay(); // sanity check\n // Set delay\n delay = newDelay;\n emit Delay(newDelay, true);\n }\n\n // @notice Internal function for setting the new core implementation\n // @param newImplementation The address of the new implementation\n function _upgradeCore(address newImplementation) internal {\n if (newImplementation == address(0)) revert InvalidImplementation();\n //if (newImplementation == coreImplementation) revert InvalidImplementation();\n address previousImplementation = coreImplementation;\n coreImplementation = newImplementation;\n emit CoreUpgraded(previousImplementation, newImplementation, true);\n }\n\n // @notice Internal function for upgrading the factory implementation\n // @param newImplementation The address of the new factory implementation\n // @param data Calldata for upgrading the new factory. Pass zero bytes if no additional call needs to be made\n function _upgradeFactory(address newImplementation, bytes memory data) internal {\n if (data.length > 0) {\n IUUPS(factory).upgradeToAndCall(newImplementation, data);\n } else {\n IUUPS(factory).upgradeTo(newImplementation);\n }\n }\n\n // @notice Internal function to check timelock and reset it after timelock has matured\n // @param key The bytes32 key that represents the function that is timelocked\n // @return The bytes data that is stored by the timelock\n function _resolveTimelock(bytes32 key) internal returns (bytes memory data) {\n _checkTimelock(key);\n data = _getTimelockValue(key);\n _resetTimelock(key);\n }\n}\n" + }, + "contracts/EnsoWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@ensofinance/weiroll/contracts/VM.sol\";\nimport \"./access/AccessController.sol\";\nimport \"./wallet/ERC1271.sol\";\nimport \"./wallet/MinimalWallet.sol\";\nimport \"./wallet/ModuleManager.sol\";\nimport \"./interfaces/IEnsoWallet.sol\";\n\ncontract EnsoWallet is IEnsoWallet, VM, AccessController, ModuleManager, ERC1271, MinimalWallet {\n using StorageAPI for bytes32;\n\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\n bytes32 internal constant SALT = bytes32(uint256(keccak256(\"enso.wallet.salt\")) - 1);\n\n error AlreadyInit();\n\n constructor() {\n // Set salt to 0xff so that the implementation cannot be initialized\n SALT.setBytes32(bytes32(type(uint256).max)); \n }\n\n // @notice Initialize wallet by setting state and permissions\n // @dev A wallet is considered initialized if the SALT is set in state. Subsequent calls to this function will fail.\n // @param owner The address of the wallet owner\n // @param salt The salt used to deploy the proxy that uses this contract as it's implementation\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands The optional commands for executing a shortcut\n // @param state The optional state for executing a shortcut\n function initialize(\n address owner,\n bytes32 salt,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) external payable override {\n if (SALT.getBytes32() != bytes32(0)) revert AlreadyInit();\n SALT.setBytes32(salt);\n _setPermission(OWNER_ROLE, owner, true);\n _setPermission(EXECUTOR_ROLE, owner, true);\n if (commands.length != 0) {\n _executeShortcut(shortcutId, commands, state);\n }\n }\n\n // @notice A function to execute an arbitrary call on another contract\n // @param target The address of the target contract\n // @param value The ether value that is to be sent with the call\n // @param data The call data to be sent to the target\n function execute(\n address target,\n uint256 value,\n bytes memory data\n ) external payable isPermitted(EXECUTOR_ROLE) returns (bool success) {\n return _executeCall(target, value, data);\n }\n\n // @notice Execute a shortcut from this contract\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands An array of bytes32 values that encode calls\n // @param state An array of bytes that are used to generate call data for each command\n function executeShortcut(\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) external payable isPermitted(EXECUTOR_ROLE) returns (bytes[] memory returnData) {\n returnData = _executeShortcut(shortcutId, commands, state);\n }\n\n // @notice Internal function to execute a shortcut from this contract\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands An array of bytes32 values that encode calls\n // @param state An array of bytes that are used to generate call data for each command\n function _executeShortcut(\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) internal returns (bytes[] memory returnData) {\n (shortcutId); // ShortcutId just needs to be retrieved from call data, can support events in future upgrade\n returnData = _execute(commands, state);\n }\n\n // @notice Internal function to execute an arbitrary call on another contract\n // @param target The address of the target contract\n // @param value The ether value that is to be sent with the call\n // @param data The call data to be sent to the target\n function _executeCall(\n address target,\n uint256 value,\n bytes memory data\n ) internal override returns (bool success) {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := call(gas(), target, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n // @notice Internal function for checking the ERC-1271 signer\n // @param signer The address that signed a message\n function _checkSigner(address signer) internal view override returns (bool) {\n return _getPermission(OWNER_ROLE, signer);\n }\n}\n" + }, + "contracts/EnsoWalletFactory.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport \"./libraries/BeaconClones.sol\";\nimport \"./access/Ownable.sol\";\nimport \"./interfaces/IEnsoWallet.sol\";\n\ncontract EnsoWalletFactory is Ownable, UUPSUpgradeable {\n using StorageAPI for bytes32;\n using BeaconClones for address;\n\n address public immutable ensoBeacon;\n\n event Deployed(IEnsoWallet instance, string label, address deployer);\n\n error AlreadyInit();\n error NoLabel();\n\n constructor(address ensoBeacon_) {\n ensoBeacon = ensoBeacon_;\n // Set owner to 0xff so that the implementation cannot be initialized\n OWNER.setAddress(address(type(uint160).max));\n }\n\n // @notice A function to initialize state on the proxy the delegates to this contract\n // @param newOwner The new owner of this contract\n function initialize(address newOwner) external {\n if (newOwner == address(0)) revert InvalidAccount();\n if (OWNER.getAddress() != address(0)) revert AlreadyInit();\n OWNER.setAddress(newOwner);\n }\n\n // @notice Deploy a wallet using the msg.sender as the salt\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands The optional commands for executing a shortcut after deployment\n // @param state The optional state for executing a shortcut after deployment\n function deploy(\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) public payable returns (IEnsoWallet) {\n bytes32 salt = bytes32(uint256(uint160(msg.sender)));\n return _deploy(salt, \"\", shortcutId, commands, state);\n }\n\n // @notice Deploy a wallet using a hash of the msg.sender and a label as the salt\n // @param label The label to identify deployment\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands The optional commands for executing a shortcut after deployment\n // @param state The optional state for executing a shortcut after deployment\n function deployCustom(\n string memory label,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) public payable returns (IEnsoWallet) {\n if (bytes(label).length == 0) revert NoLabel();\n bytes32 salt = _customSalt(msg.sender, label);\n return _deploy(salt, label, shortcutId, commands, state);\n }\n\n // @notice Get the deployment address for the msg.sender\n function getAddress() public view returns (address payable) {\n return getUserAddress(msg.sender);\n }\n\n // @notice Get the deployment address for the user\n // @param user The address of the user that is used to determine the deployment address\n function getUserAddress(address user) public view returns (address payable) {\n bytes32 salt = bytes32(uint256(uint160(user)));\n return _predictDeterministicAddress(salt);\n }\n\n // @notice Get the deployment address for a user and label\n // @param user The address of the user that is used to determine the deployment address\n // @param label The label that is used to determine the deployment address\n function getCustomAddress(address user, string memory label) external view returns (address payable) {\n if (bytes(label).length == 0) revert NoLabel();\n bytes32 salt = _customSalt(user, label);\n return _predictDeterministicAddress(salt);\n }\n\n // @notice The internal function for deploying a new wallet\n // @param salt The salt for deploy the address deterministically\n // @param label The label to identify deployment in the emitted event\n // @param shortcutId The bytes32 value representing a shortcut\n // @param commands The optional commands for executing a shortcut after deployment\n // @param state The optional state for executing a shortcut after deployment\n function _deploy(\n bytes32 salt,\n string memory label,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) internal returns (IEnsoWallet instance) {\n instance = IEnsoWallet(payable(ensoBeacon.cloneDeterministic(salt)));\n instance.initialize{value: msg.value}(msg.sender, salt, shortcutId, commands, state);\n emit Deployed(instance, label, msg.sender);\n }\n\n // @notice Internal function to generate a custom salt using a user address and label\n // @param user The address of the user\n // @param label The label to identify the deployment\n function _customSalt(address user, string memory label) internal pure returns (bytes32) {\n return keccak256(abi.encode(user, label));\n }\n\n // @notice Internal function to derive the deployment address from a salt\n // @param salt The bytes32 salt to generate the deployment address\n function _predictDeterministicAddress(bytes32 salt) internal view returns (address payable) {\n return payable(ensoBeacon.predictDeterministicAddress(salt, address(this)));\n }\n\n // @notice Internal function to support UUPS upgrades of the implementing proxy\n // @notice newImplementation Address of the new implementation\n function _authorizeUpgrade(address newImplementation) internal view override {\n (newImplementation);\n if (msg.sender != OWNER.getAddress()) revert NotOwner();\n }\n}\n" + }, + "contracts/interfaces/IBeacon.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ninterface IBeacon {\n function implementation() external view returns (address);\n}\n" + }, + "contracts/interfaces/IEnsoWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ninterface IEnsoWallet {\n function initialize(\n address owner,\n bytes32 salt,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) external payable;\n}\n" + }, + "contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.16;\n\ninterface IERC1271 {\n function isValidSignature(bytes32 _hash, bytes calldata _signature) external view returns (bytes4 magicValue);\n\n function isValidSignature(\n bytes calldata _message,\n bytes calldata _signature\n ) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interfaces/IModuleManager.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.16;\n\ninterface IModuleManager {\n enum Operation {Call, DelegateCall}\n\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Operation operation\n ) external returns (bool success);\n\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Operation operation\n ) external returns (bool success, bytes memory returnData);\n}" + }, + "contracts/interfaces/IOwnable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.16;\n\ninterface IOwnable {\n function transferOwnership(address newOwner) external;\n\n function acceptOwnership() external;\n}\n" + }, + "contracts/interfaces/IUUPS.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.16;\n\ninterface IUUPS {\n function upgradeTo(address newImplementation) external;\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external;\n}\n" + }, + "contracts/libraries/BeaconClones.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\n// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol\n\npragma solidity ^0.8.16;\n\nlibrary BeaconClones {\n /**\n * @dev Deploys and returns the address of a clone that gets an implementation\n * from the `beacon` and mimics its behaviour.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `beacon` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address beacon, bytes32 salt) internal returns (address instance) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\n mstore(add(ptr, 0x54), shl(0x60, beacon))\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c634300081000330000)\n instance := create2(0, ptr, 0xc6, salt)\n }\n require(instance != address(0), \"create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address beacon,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x6080604052348015600f57600080fd5b5060a88061001e6000396000f3fe6080)\n mstore(add(ptr, 0x20), 0x6040526040517f5c60da1b000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x40), 0x0000000000000081526000600160208260048573000000000000000000000000)\n mstore(add(ptr, 0x54), shl(0x60, beacon))\n mstore(add(ptr, 0x68), 0x5afa0360705780513682833781823684845af490503d82833e808015606c573d)\n mstore(add(ptr, 0x88), 0x83f35b3d83fd5b00fea264697066735822122002f8a2f5acabeb1d754972351e)\n mstore(add(ptr, 0xa8), 0xc784958a7f99e64f368c267a38bb375594c03c64736f6c63430008100033ff00)\n mstore(add(ptr, 0xc7), shl(0x60, deployer))\n mstore(add(ptr, 0xdb), salt)\n mstore(add(ptr, 0xfb), keccak256(ptr, 0xc6))\n predicted := keccak256(add(ptr, 0xc6), 0x55)\n }\n }\n}\n" + }, + "contracts/libraries/Clones.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\n// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol\n\npragma solidity ^0.8.16;\n\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, address salt) internal returns (address instance) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(ptr, 0x14), shl(0x60, implementation))\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create2(0, ptr, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n address salt,\n address deployer\n ) internal pure returns (address predicted) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(ptr, 0x14), shl(0x60, implementation))\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\n mstore(add(ptr, 0x38), shl(0x60, deployer))\n mstore(add(ptr, 0x4c), salt)\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\n predicted := keccak256(add(ptr, 0x37), 0x55)\n }\n }\n}\n" + }, + "contracts/libraries/StorageAPI.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nlibrary StorageAPI {\n function setBytes(bytes32 key, bytes memory data) internal {\n bytes32 slot = keccak256(abi.encodePacked(key));\n assembly {\n let length := mload(data)\n switch gt(length, 0x1F)\n case 0x00 {\n sstore(key, or(mload(add(data, 0x20)), mul(length, 2)))\n }\n case 0x01 {\n sstore(key, add(mul(length, 2), 1))\n for {\n let i := 0\n } lt(mul(i, 0x20), length) {\n i := add(i, 0x01)\n } {\n sstore(add(slot, i), mload(add(data, mul(add(i, 1), 0x20))))\n }\n }\n }\n }\n\n function setBytes32(bytes32 key, bytes32 val) internal {\n assembly {\n sstore(key, val)\n }\n }\n\n function setAddress(bytes32 key, address a) internal {\n assembly {\n sstore(key, a)\n }\n }\n\n function setUint256(bytes32 key, uint256 val) internal {\n assembly {\n sstore(key, val)\n }\n }\n\n function setInt256(bytes32 key, int256 val) internal {\n assembly {\n sstore(key, val)\n }\n }\n\n function setBool(bytes32 key, bool val) internal {\n assembly {\n sstore(key, val)\n }\n }\n\n function getBytes(bytes32 key) internal view returns (bytes memory data) {\n bytes32 slot = keccak256(abi.encodePacked(key));\n assembly {\n let length := sload(key)\n switch and(length, 0x01)\n case 0x00 {\n let decodedLength := div(and(length, 0xFF), 2)\n mstore(data, decodedLength)\n mstore(add(data, 0x20), and(length, not(0xFF)))\n mstore(0x40, add(data, 0x40))\n }\n case 0x01 {\n let decodedLength := div(length, 2)\n let i := 0\n mstore(data, decodedLength)\n for {\n\n } lt(mul(i, 0x20), decodedLength) {\n i := add(i, 0x01)\n } {\n mstore(add(add(data, 0x20), mul(i, 0x20)), sload(add(slot, i)))\n }\n mstore(0x40, add(data, add(0x20, mul(i, 0x20))))\n }\n }\n }\n\n function getBytes32(bytes32 key) internal view returns (bytes32 val) {\n assembly {\n val := sload(key)\n }\n }\n\n function getAddress(bytes32 key) internal view returns (address a) {\n assembly {\n a := sload(key)\n }\n }\n\n function getUint256(bytes32 key) internal view returns (uint256 val) {\n assembly {\n val := sload(key)\n }\n }\n\n function getInt256(bytes32 key) internal view returns (int256 val) {\n assembly {\n val := sload(key)\n }\n }\n\n function getBool(bytes32 key) internal view returns (bool val) {\n assembly {\n val := sload(key)\n }\n }\n}\n" + }, + "contracts/libraries/UpgradeableClones.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)\n// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol\n\npragma solidity ^0.8.16;\n\nlibrary UpgradeableClones {\n bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Deploys and returns the address of a clone that stores an implementation\n * in state and mimics its behaviour.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert,\n * since the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, address salt) internal returns (address instance) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x6080604052348015600f57600080fd5b50730000000000000000000000000000)\n mstore(add(ptr, 0x12), shl(0x60, implementation))\n mstore(add(ptr, 0x26), 0x7f00000000000000000000000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x27), _IMPLEMENTATION_SLOT)\n mstore(add(ptr, 0x47), 0x556081806100556000396000f3fe60806040527f000000000000000000000000)\n mstore(add(ptr, 0x5b), _IMPLEMENTATION_SLOT)\n mstore(add(ptr, 0x7b), 0x543660008037600080366000845af490503d6000803e8080156046573d6000f3)\n mstore(add(ptr, 0x9b), 0x5b3d6000fdfea264697066735822122069639fe1c8c748ea5710f4706c1db531)\n mstore(add(ptr, 0xbb), 0xe16560df7fa1965479f51cafa674620b64736f6c634300081000330000000000)\n instance := create2(0, ptr, 0xd6, salt)\n }\n require(instance != address(0), \"create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n address salt,\n address deployer\n ) internal pure returns (address predicted) {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x6080604052348015600f57600080fd5b50730000000000000000000000000000)\n mstore(add(ptr, 0x12), shl(0x60, implementation))\n mstore(add(ptr, 0x26), 0x7f00000000000000000000000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x27), _IMPLEMENTATION_SLOT)\n mstore(add(ptr, 0x47), 0x556081806100556000396000f3fe60806040527f000000000000000000000000)\n mstore(add(ptr, 0x5b), _IMPLEMENTATION_SLOT)\n mstore(add(ptr, 0x7b), 0x543660008037600080366000845af490503d6000803e8080156046573d6000f3)\n mstore(add(ptr, 0x9b), 0x5b3d6000fdfea264697066735822122069639fe1c8c748ea5710f4706c1db531)\n mstore(add(ptr, 0xbb), 0xe16560df7fa1965479f51cafa674620b64736f6c63430008100033ff00000000)\n mstore(add(ptr, 0xd7), shl(0x60, deployer))\n mstore(add(ptr, 0xeb), salt)\n mstore(add(ptr, 0x10b), keccak256(ptr, 0xd6))\n predicted := keccak256(add(ptr, 0xd6), 0x55)\n }\n }\n}\n" + }, + "contracts/proxy/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ncontract BeaconProxy {\n address private immutable BEACON;\n\n constructor(address beacon) {\n BEACON = beacon;\n }\n\n fallback() external payable {\n address beacon = BEACON;\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x5c60da1b00000000000000000000000000000000000000000000000000000000)\n let status := staticcall(gas(), beacon, ptr, 4, 0, 32)\n if eq(status, 1) {\n let addr := mload(0)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n}\n" + }, + "contracts/proxy/BeaconProxyTemplate.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\n/**\n * @dev This contract is used to generate creation code for the BeaconClones contract\n * it will not work if deployed as is\n */\ncontract BeaconProxyTemplate {\n fallback() external payable {\n // Use placeholder beacon\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x5c60da1b00000000000000000000000000000000000000000000000000000000)\n let status := staticcall(gas(), 0xBEbeBeBEbeBebeBeBEBEbebEBeBeBebeBeBebebe, ptr, 4, 0, 32)\n if eq(status, 1) {\n let addr := mload(0)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n}\n" + }, + "contracts/proxy/EnsoWalletProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ncontract EnsoWalletProxy {\n fallback() external payable {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x5c60da1b00000000000000000000000000000000000000000000000000000000)\n let status := staticcall(gas(), 0x277D98D33b7F44921d4230697DeF8d1D56aBAa62, ptr, 4, 0, 32)\n if eq(status, 1) {\n let addr := mload(0)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n}\n" + }, + "contracts/proxy/UpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ncontract UpgradeableProxy {\n bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n constructor(address implementation) {\n assembly {\n sstore(_IMPLEMENTATION_SLOT, implementation)\n }\n }\n\n fallback() external payable {\n assembly {\n let addr := sload(_IMPLEMENTATION_SLOT)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/UpgradeableProxyTemplate.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\n/**\n * @dev This contract is used to generate creation code for the UpgradeableClones contract\n * it will not work if deployed as is\n */\ncontract UpgradeableProxyTemplate {\n bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n constructor() {\n // placeholder implementation\n assembly {\n sstore(_IMPLEMENTATION_SLOT, 0xBEbeBeBEbeBebeBeBEBEbebEBeBeBebeBeBebebe)\n }\n }\n\n fallback() external payable {\n assembly {\n let addr := sload(_IMPLEMENTATION_SLOT)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), addr, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/test/AllowanceModule.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../interfaces/IModuleManager.sol\";\n\ncontract AllowanceModule {\n\n string public constant NAME = \"Allowance Module\";\n string public constant VERSION = \"0.1.0\";\n\n bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n\n bytes32 public constant ALLOWANCE_TRANSFER_TYPEHASH = 0x80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb;\n // keccak256(\n // \"AllowanceTransfer(address safe,address token,uint96 amount,address paymentToken,uint96 payment,uint16 nonce)\"\n // );\n\n // Safe -> Delegate -> Allowance\n mapping(address => mapping (address => mapping(address => Allowance))) public allowances;\n // Safe -> Delegate -> Tokens\n mapping(address => mapping (address => address[])) public tokens;\n // Safe -> Delegates double linked list entry points\n mapping(address => uint48) public delegatesStart;\n // Safe -> Delegates double linked list\n mapping(address => mapping (uint48 => Delegate)) public delegates;\n\n // We use a double linked list for the delegates. The id is the first 6 bytes. \n // To double check the address in case of collision, the address is part of the struct.\n struct Delegate {\n address delegate;\n uint48 prev;\n uint48 next;\n }\n\n // The allowance info is optimized to fit into one word of storage.\n struct Allowance {\n uint96 amount;\n uint96 spent;\n uint16 resetTimeMin; // Maximum reset time span is 65k minutes\n uint32 lastResetMin;\n uint16 nonce;\n }\n\n event AddDelegate(address indexed safe, address delegate);\n event RemoveDelegate(address indexed safe, address delegate);\n event ExecuteAllowanceTransfer(address indexed safe, address delegate, address token, address to, uint96 value, uint16 nonce);\n event PayAllowanceTransfer(address indexed safe, address delegate, address paymentToken, address paymentReceiver, uint96 payment);\n event SetAllowance(address indexed safe, address delegate, address token, uint96 allowanceAmount, uint16 resetTime);\n event ResetAllowance(address indexed safe, address delegate, address token);\n event DeleteAllowance(address indexed safe, address delegate, address token);\n\n /// @dev Allows to update the allowance for a specified token. This can only be done via a Safe transaction.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n /// @param allowanceAmount allowance in smallest token unit.\n /// @param resetTimeMin Time after which the allowance should reset\n /// @param resetBaseMin Time based on which the reset time should be increased\n function setAllowance(address delegate, address token, uint96 allowanceAmount, uint16 resetTimeMin, uint32 resetBaseMin)\n public\n {\n require(delegate != address(0), \"delegate != address(0)\");\n require(delegates[msg.sender][uint48(uint160(delegate))].delegate == delegate, \"delegates[msg.sender][uint48(uint160(delegate))].delegate == delegate\");\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n if (allowance.nonce == 0) { // New token\n // Nonce should never be 0 once allowance has been activated\n allowance.nonce = 1;\n tokens[msg.sender][delegate].push(token);\n }\n // Divide by 60 to get current time in minutes\n // solium-disable-next-line security/no-block-members\n uint32 currentMin = uint32(block.timestamp / 60);\n if (resetBaseMin > 0) {\n require(resetBaseMin <= currentMin, \"resetBaseMin <= currentMin\");\n allowance.lastResetMin = currentMin - ((currentMin - resetBaseMin) % resetTimeMin);\n } else if (allowance.lastResetMin == 0) {\n allowance.lastResetMin = currentMin;\n }\n allowance.resetTimeMin = resetTimeMin;\n allowance.amount = allowanceAmount;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit SetAllowance(msg.sender, delegate, token, allowanceAmount, resetTimeMin);\n }\n\n function getAllowance(address safe, address delegate, address token) private view returns (Allowance memory allowance) {\n allowance = allowances[safe][delegate][token];\n // solium-disable-next-line security/no-block-members\n uint32 currentMin = uint32(block.timestamp / 60);\n // Check if we should reset the time. We do this on load to minimize storage read/ writes\n if (allowance.resetTimeMin > 0 && allowance.lastResetMin <= currentMin - allowance.resetTimeMin) {\n allowance.spent = 0;\n // Resets happen in regular intervals and `lastResetMin` should be aligned to that\n allowance.lastResetMin = currentMin - ((currentMin - allowance.lastResetMin) % allowance.resetTimeMin);\n }\n return allowance;\n }\n\n function updateAllowance(address safe, address delegate, address token, Allowance memory allowance) private {\n allowances[safe][delegate][token] = allowance;\n }\n\n /// @dev Allows to reset the allowance for a specific delegate and token.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n function resetAllowance(address delegate, address token) public {\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.spent = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit ResetAllowance(msg.sender, delegate, token);\n }\n\n /// @dev Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n function deleteAllowance(address delegate, address token)\n public\n {\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.amount = 0;\n allowance.spent = 0;\n allowance.resetTimeMin = 0;\n allowance.lastResetMin = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit DeleteAllowance(msg.sender, delegate, token);\n }\n\n /// @dev Allows to use the allowance to perform a transfer.\n /// @param safe The Safe whose funds should be used.\n /// @param token Token contract address.\n /// @param to Address that should receive the tokens.\n /// @param amount Amount that should be transferred.\n /// @param paymentToken Token that should be used to pay for the execution of the transfer.\n /// @param payment Amount to should be paid for executing the transfer.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param signature Signature generated by the delegate to authorize the transfer.\n function executeAllowanceTransfer(\n IModuleManager safe,\n address token,\n address payable to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n address delegate,\n bytes memory signature\n ) public {\n // Get current state\n Allowance memory allowance = getAllowance(address(safe), delegate, token);\n bytes memory transferHashData = generateTransferHashData(address(safe), token, to, amount, paymentToken, payment, allowance.nonce);\n // Update state\n allowance.nonce = allowance.nonce + 1;\n uint96 newSpent = allowance.spent + amount;\n // Check new spent amount and overflow\n require(newSpent > allowance.spent && newSpent <= allowance.amount, \"newSpent > allowance.spent && newSpent <= allowance.amount\");\n allowance.spent = newSpent;\n if (payment > 0) {\n // Use updated allowance if token and paymentToken are the same\n Allowance memory paymentAllowance = paymentToken == token ? allowance : getAllowance(address(safe), delegate, paymentToken);\n newSpent = paymentAllowance.spent + payment;\n // Check new spent amount and overflow\n require(newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount, \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\");\n paymentAllowance.spent = newSpent;\n // Update payment allowance if different from allowance\n if (paymentToken != token) updateAllowance(address(safe), delegate, paymentToken, paymentAllowance);\n }\n updateAllowance(address(safe), delegate, token, allowance);\n\n // Perform external interactions\n // Check signature\n checkSignature(delegate, signature, transferHashData, safe);\n\n if (payment > 0) {\n // Transfer payment\n // solium-disable-next-line security/no-tx-origin\n transfer(safe, paymentToken, payable(tx.origin), payment);\n // solium-disable-next-line security/no-tx-origin\n emit PayAllowanceTransfer(address(safe), delegate, paymentToken, tx.origin, payment);\n }\n // Transfer token\n transfer(safe, token, to, amount);\n emit ExecuteAllowanceTransfer(address(safe), delegate, token, to, amount, allowance.nonce - 1);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n /// @dev Generates the data for the transfer hash (required for signing)\n function generateTransferHashData(\n address safe,\n address token,\n address to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n uint16 nonce\n ) private view returns (bytes memory) {\n uint256 chainId = getChainId();\n bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, chainId, this));\n bytes32 transferHash = keccak256(\n abi.encode(ALLOWANCE_TRANSFER_TYPEHASH, safe, token, to, amount, paymentToken, payment, nonce)\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator, transferHash);\n }\n\n /// @dev Generates the transfer hash that should be signed to authorize a transfer\n function generateTransferHash(\n address safe,\n address token,\n address to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n uint16 nonce\n ) public view returns (bytes32) {\n return keccak256(generateTransferHashData(\n safe, token, to, amount, paymentToken, payment, nonce\n ));\n }\n\n function checkSignature(address expectedDelegate, bytes memory signature, bytes memory transferHashData, IModuleManager safe) private view {\n address signer = recoverSignature(signature, transferHashData);\n require(\n expectedDelegate == signer && delegates[address(safe)][uint48(uint160(signer))].delegate == signer,\n \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\"\n );\n }\n\n // We use the same format as used for the Safe contract, except that we only support exactly 1 signature and no contract signatures.\n function recoverSignature(bytes memory signature, bytes memory transferHashData) private view returns (address owner) {\n // If there is no signature data msg.sender should be used\n if (signature.length == 0) return msg.sender;\n // Check that the provided signature data is as long as 1 encoded ecsda signature\n require(signature.length == 65, \"signatures.length == 65\");\n uint8 v;\n bytes32 r;\n bytes32 s;\n (v, r, s) = signatureSplit(signature, 0);\n // If v is 0 then it is a contract signature\n if (v == 0) {\n revert(\"Contract signatures are not supported by this module\");\n } else if (v == 1) {\n // If v is 1 we also use msg.sender, this is so that we are compatible to the GnosisSafe signature scheme\n owner = msg.sender;\n } else if (v > 30) {\n // To support eth_sign and similar we adjust v and hash the transferHashData with the Ethereum message prefix before applying ecrecover\n owner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", keccak256(transferHashData))), v - 4, r, s);\n } else {\n // Use ecrecover with the messageHash for EOA signatures\n owner = ecrecover(keccak256(transferHashData), v, r, s);\n }\n // 0 for the recovered owner indicates that an error happened.\n require(owner != address(0), \"owner != address(0)\");\n }\n\n function transfer(IModuleManager safe, address token, address payable to, uint96 amount) private {\n if (token == address(0)) {\n // solium-disable-next-line security/no-send\n require(safe.execTransactionFromModule(to, amount, \"\", IModuleManager.Operation.Call), \"Could not execute ether transfer\");\n } else {\n bytes memory data = abi.encodeWithSignature(\"transfer(address,uint256)\", to, amount);\n require(safe.execTransactionFromModule(token, 0, data, IModuleManager.Operation.Call), \"Could not execute token transfer\");\n }\n }\n\n function getTokens(address safe, address delegate) public view returns (address[] memory) {\n return tokens[safe][delegate];\n }\n\n function getTokenAllowance(address safe, address delegate, address token) public view returns (uint256[5] memory) {\n Allowance memory allowance = getAllowance(safe, delegate, token);\n return [\n uint256(allowance.amount),\n uint256(allowance.spent),\n uint256(allowance.resetTimeMin),\n uint256(allowance.lastResetMin),\n uint256(allowance.nonce)\n ];\n }\n\n /// @dev Allows to add a delegate.\n /// @param delegate Delegate that should be added.\n function addDelegate(address delegate) public {\n uint48 index = uint48(uint160(delegate));\n require(index != uint(0), \"index != uint(0)\");\n address currentDelegate = delegates[msg.sender][index].delegate;\n if(currentDelegate != address(0)) {\n // We have a collision for the indices of delegates\n require(currentDelegate == delegate, \"currentDelegate == delegate\");\n // Delegate already exists, nothing to do\n return;\n }\n uint48 startIndex = delegatesStart[msg.sender];\n delegates[msg.sender][index] = Delegate(delegate, 0, startIndex);\n delegates[msg.sender][startIndex].prev = index;\n delegatesStart[msg.sender] = index;\n emit AddDelegate(msg.sender, delegate);\n }\n\n /// @dev Allows to remove a delegate.\n /// @param delegate Delegate that should be removed.\n /// @param removeAllowances Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \"manually\" deleted via `deleteAllowance`.\n function removeDelegate(address delegate, bool removeAllowances) public {\n Delegate memory current = delegates[msg.sender][uint48(uint160(delegate))];\n // Delegate doesn't exists, nothing to do\n if(current.delegate == address(0)) return;\n if (removeAllowances) {\n address[] storage delegateTokens = tokens[msg.sender][delegate];\n for (uint256 i = 0; i < delegateTokens.length; i++) {\n address token = delegateTokens[i];\n // Set all allowance params except the nonce to 0\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.amount = 0;\n allowance.spent = 0;\n allowance.resetTimeMin = 0;\n allowance.lastResetMin = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit DeleteAllowance(msg.sender, delegate, token);\n }\n }\n if (current.prev == 0) {\n delegatesStart[msg.sender] = current.next;\n } else {\n delegates[msg.sender][current.prev].next = current.next;\n }\n if (current.next != 0) {\n delegates[msg.sender][current.next].prev = current.prev;\n }\n delete delegates[msg.sender][uint48(uint160(delegate))];\n emit RemoveDelegate(msg.sender, delegate);\n }\n\n function getDelegates(address safe, uint48 start, uint8 pageSize) public view returns (address[] memory results, uint48 next) {\n results = new address[](pageSize);\n uint8 i = 0;\n uint48 initialIndex = (start != 0) ? start : delegatesStart[safe];\n Delegate memory current = delegates[safe][initialIndex];\n while(current.delegate != address(0) && i < pageSize) {\n results[i] = current.delegate;\n i++;\n current = delegates[safe][current.next];\n }\n next = uint48(uint160(current.delegate));\n // Set the length of the array the number that has been used.\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n mstore(results, i)\n }\n }\n\n /// @dev Recovers address who signed the message\n /// @param messageHash operation ethereum signed message hash\n /// @param messageSignature message `txHash` signature\n /// @param pos which signature to read\n function recoverKey (\n bytes32 messageHash,\n bytes memory messageSignature,\n uint256 pos\n )\n internal\n pure\n returns (address)\n {\n uint8 v;\n bytes32 r;\n bytes32 s;\n (v, r, s) = signatureSplit(messageSignature, pos);\n return ecrecover(messageHash, v, r, s);\n }\n\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (uint8 v, bytes32 r, bytes32 s)\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}" + }, + "contracts/test/ApprovableMinimalWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../wallet/MinimalWallet.sol\";\n\ncontract ApprovableMinimalWallet is MinimalWallet {\n function approveERC20(IERC20 erc20, address spender) external {\n erc20.approve(spender, type(uint256).max);\n }\n\n function approveERC721(IERC721 erc721, address spender) external {\n erc721.setApprovalForAll(spender, true);\n }\n\n function approveERC1155(IERC1155 erc1155, address spender) external {\n erc1155.setApprovalForAll(spender, true);\n }\n}\n" + }, + "contracts/test/DestructEnsoWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nimport \"../access/AccessController.sol\";\nimport \"./ApprovableMinimalWallet.sol\";\n\ncontract Destroyer {\n function kill() public returns (bytes[] memory data) {\n selfdestruct(payable(msg.sender));\n return data;\n }\n}\n\ncontract DestructEnsoWallet is AccessController, ApprovableMinimalWallet {\n using StorageAPI for bytes32;\n\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\n bytes32 internal constant SALT = bytes32(uint256(keccak256(\"enso.wallet.salt\")) - 1);\n\n event DelegateCallReturn(bool success, bytes ret);\n\n error AlreadyInit();\n\n constructor() {\n // Set salt to 0xff so that the implementation cannot be initialized\n SALT.setBytes32(bytes32(type(uint256).max)); \n }\n\n function initialize(\n address owner,\n bytes32 salt,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) external payable {\n if (SALT.getBytes32() != bytes32(0)) revert AlreadyInit();\n SALT.setBytes32(salt);\n _setPermission(OWNER_ROLE, owner, true);\n _setPermission(EXECUTOR_ROLE, owner, true);\n if (commands.length != 0) {\n executeShortcut(shortcutId, commands, state);\n }\n }\n\n function executeShortcut(\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) public isPermitted(EXECUTOR_ROLE) returns (bytes[] memory data) {\n (shortcutId);\n Destroyer destroyer = new Destroyer();\n (bool success, bytes memory ret) = address(destroyer).delegatecall(\n abi.encodeWithSelector(destroyer.kill.selector, commands, state)\n );\n emit DelegateCallReturn(success, ret);\n return data;\n }\n}\n" + }, + "contracts/test/DumbEnsoWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.16;\n\nimport \"../access/AccessController.sol\";\nimport \"./ApprovableMinimalWallet.sol\";\n\ncontract DumbEnsoWallet is AccessController, ApprovableMinimalWallet {\n using StorageAPI for bytes32;\n\n // Using same slot generation technique as eip-1967 -- https://eips.ethereum.org/EIPS/eip-1967\n bytes32 internal constant SALT = bytes32(uint256(keccak256(\"enso.wallet.salt\")) - 1);\n\n event VMData(bytes32[] commands, bytes[] state);\n event SenderData(address sender, uint256 value);\n\n error AlreadyInit();\n\n constructor() {\n // Set salt to 0xff so that the implementation cannot be initialized\n SALT.setBytes32(bytes32(type(uint256).max)); \n }\n\n function initialize(\n address owner,\n bytes32 salt,\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) external payable {\n (shortcutId);\n if (SALT.getBytes32() != bytes32(0)) revert AlreadyInit();\n SALT.setBytes32(salt);\n _setPermission(OWNER_ROLE, owner, true);\n _setPermission(EXECUTOR_ROLE, owner, true);\n if (commands.length != 0) {\n _execute(commands, state);\n }\n }\n\n function executeShortcut(\n bytes32 shortcutId,\n bytes32[] calldata commands,\n bytes[] calldata state\n ) public payable isPermitted(EXECUTOR_ROLE) returns (bytes[] memory) {\n (shortcutId);\n return _execute(commands, state);\n }\n\n function _execute(bytes32[] calldata commands, bytes[] memory state) internal returns (bytes[] memory) {\n emit VMData(commands, state);\n emit SenderData(msg.sender, msg.value);\n return state;\n }\n}\n" + }, + "contracts/test/Events.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ncontract Events {\n event LogBytes(bytes message);\n event LogString(string message);\n event LogBytes32(bytes32 message);\n event LogUint(uint256 message);\n\n function logBytes(bytes calldata message) external {\n emit LogBytes(message);\n }\n\n function logString(string calldata message) external {\n emit LogString(message);\n }\n\n function logBytes32(bytes32 message) external {\n emit LogBytes32(message);\n }\n\n function logUint(uint256 message) external {\n emit LogUint(message);\n }\n}\n" + }, + "contracts/test/MockERC1155.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\n\ncontract MockERC1155 is ERC1155 {\n constructor(string memory uri_) ERC1155(uri_) {\n _mint(msg.sender, 0, 1, \"\");\n _mint(msg.sender, 1, 10, \"\");\n _mint(msg.sender, 2, 100, \"\");\n }\n}\n" + }, + "contracts/test/MockERC20.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MockERC20 is ERC20 {\n constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {\n _mint(msg.sender, 10 ** 18);\n }\n}\n" + }, + "contracts/test/MockERC721.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\ncontract MockERC721 is ERC721 {\n constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) {\n _mint(msg.sender, 0);\n _mint(msg.sender, 1);\n _mint(msg.sender, 2);\n }\n}\n" + }, + "contracts/test/MockFactoryUpgrade.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../EnsoWalletFactory.sol\";\n\ncontract MockFactoryUpgrade is EnsoWalletFactory {\n constructor(address ensoBeacon_) EnsoWalletFactory(ensoBeacon_) {}\n\n function newFunctionTest() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/test/MockWalletUpgrade.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"./DumbEnsoWallet.sol\";\n\ncontract MockWalletUpgrade is DumbEnsoWallet {\n function newFunctionTest() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/test/OwnershipTester.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../interfaces/IOwnable.sol\";\n\ninterface IBeaconAdmin {\n function acceptAdministration() external;\n\n function acceptDelegation() external;\n}\n\ncontract OwnershipTester {\n function acceptOwnership(address ownable) external {\n IOwnable(ownable).acceptOwnership();\n }\n\n function acceptAdministration(address beacon) external {\n IBeaconAdmin(beacon).acceptAdministration();\n }\n\n function acceptDelegation(address beacon) external {\n IBeaconAdmin(beacon).acceptDelegation();\n }\n}\n" + }, + "contracts/test/PayableEvents.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\ncontract PayableEvents {\n event LogBytes(bytes message);\n event LogString(string message);\n event LogBytes32(bytes32 message);\n event LogUint(uint256 message);\n\n function logBytes(bytes calldata message) external payable {\n emit LogBytes(message);\n }\n\n function logString(string calldata message) external payable {\n emit LogString(message);\n }\n\n function logBytes32(bytes32 message) external payable {\n emit LogBytes32(message);\n }\n\n function logUint(uint256 message) external payable {\n emit LogUint(message);\n }\n\n function logValue() external payable {\n emit LogUint(msg.value);\n }\n}\n" + }, + "contracts/test/StreamerModule.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../interfaces/IModuleManager.sol\";\n\ncontract StreamerModule {\n\n struct StreamInfo {\n uint256 amountPerSec;\n uint256 endTime;\n uint256 lastTimestamp;\n }\n\n mapping(address => mapping(address => StreamInfo)) public streams;\n\n event Stream(address indexed sender, address indexed receiver, uint256 amount, uint256 timeRange);\n\n error StreamFailed();\n error InvalidTimes();\n \n function addStream(\n address receiver,\n uint256 amountPerSec,\n uint256 startTime,\n uint256 endTime\n ) external {\n if (startTime > endTime) revert InvalidTimes();\n StreamInfo storage streamInfo = streams[msg.sender][receiver];\n if (\n streamInfo.lastTimestamp != 0 && \n streamInfo.lastTimestamp < block.timestamp &&\n streamInfo.lastTimestamp < streamInfo.endTime\n ) {\n // Stream funds up to now\n _stream(msg.sender, receiver, streamInfo);\n }\n streamInfo.amountPerSec = amountPerSec;\n streamInfo.lastTimestamp = startTime > 0 ? startTime : block.timestamp;\n streamInfo.endTime = endTime;\n }\n\n function stream(address sender) external {\n StreamInfo storage streamInfo = streams[sender][msg.sender];\n _stream(sender, msg.sender, streamInfo);\n }\n\n function _stream(\n address sender,\n address receiver,\n StreamInfo storage streamInfo\n ) internal {\n bool streamEnd = block.timestamp > streamInfo.endTime;\n uint256 timestamp = streamEnd ? streamInfo.endTime : block.timestamp;\n uint256 timeRange = timestamp - streamInfo.lastTimestamp;\n uint256 amount = streamInfo.amountPerSec * timeRange;\n if (streamEnd) {\n delete streamInfo.amountPerSec;\n delete streamInfo.lastTimestamp;\n delete streamInfo.endTime;\n } else {\n streamInfo.lastTimestamp = timestamp;\n }\n bool success = IModuleManager(sender).execTransactionFromModule(\n receiver,\n amount,\n new bytes(0),\n IModuleManager.Operation.Call\n );\n if (!success) revert StreamFailed();\n emit Stream(sender, receiver, amount, timeRange);\n }\n}" + }, + "contracts/wallet/ERC1271.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"../interfaces/IERC1271.sol\";\n\nabstract contract ERC1271 is IERC1271 {\n using ECDSA for bytes32;\n\n bytes4 internal constant MAGICVALUE_BYTES = 0x20c13b0b;\n bytes4 internal constant MAGICVALUE_BYTES32 = 0x1626ba7e;\n bytes4 internal constant INVALID_SIGNATURE = 0xffffffff;\n\n // @notice Checks for a valid signature\n // @param hash A bytes32 hash of a message\n // @param signature The signed hash of the message\n function isValidSignature(bytes32 hash, bytes memory signature) public view override returns (bytes4 magicValue) {\n address signer = hash.recover(signature);\n magicValue = _checkSigner(signer) ? MAGICVALUE_BYTES32 : INVALID_SIGNATURE;\n }\n\n // @notice Checks for a valid signature\n // @param message The message that has been signed\n // @param signature The signed hash of the message\n function isValidSignature(\n bytes memory message,\n bytes memory signature\n ) public view override returns (bytes4 magicValue) {\n address signer = ECDSA.toEthSignedMessageHash(message).recover(signature);\n magicValue = _checkSigner(signer) ? MAGICVALUE_BYTES : INVALID_SIGNATURE;\n }\n\n // @notice Confirm signer is permitted to sign on behalf of contract\n // @dev Abstract function to implemented by importing contract\n // @param signer The address of the message signer\n // @return Bool confirming whether signer is permitted\n function _checkSigner(address signer) internal view virtual returns (bool);\n}\n" + }, + "contracts/wallet/MinimalWallet.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\";\nimport \"../access/ACL.sol\";\nimport \"../access/Roles.sol\";\n\ncontract MinimalWallet is ACL, Roles, ERC721Holder, ERC1155Holder {\n using SafeERC20 for IERC20;\n\n enum Protocol {\n ETH,\n ERC20,\n ERC721,\n ERC1155\n }\n\n struct TransferNote {\n Protocol protocol;\n address token;\n uint256[] ids;\n uint256[] amounts;\n }\n\n struct ApprovalNote {\n Protocol protocol;\n address token;\n address[] operators;\n }\n\n error WithdrawFailed();\n error InvalidArrayLength();\n\n ////////////////////////////////////////////////////\n // External functions //////////////////////////////\n ////////////////////////////////////////////////////\n\n // @notice Withdraw an array of assets\n // @dev Works for ETH, ERC20s, ERC721s, and ERC1155s\n // @param notes A tuple that contains the protocol id, token address, array of ids and amounts\n function withdraw(TransferNote[] calldata notes) external isPermitted(OWNER_ROLE) {\n TransferNote memory note;\n Protocol protocol;\n uint256[] memory ids;\n uint256[] memory amounts;\n\n uint256 length = notes.length;\n for (uint256 i; i < length; ) {\n note = notes[i];\n protocol = note.protocol;\n if (protocol == Protocol.ETH) {\n amounts = note.amounts;\n if (amounts.length != 1) revert InvalidArrayLength();\n _withdrawETH(amounts[0]);\n } else if (protocol == Protocol.ERC20) {\n amounts = note.amounts;\n if (amounts.length != 1) revert InvalidArrayLength();\n _withdrawERC20(IERC20(note.token), amounts[0]);\n } else if (protocol == Protocol.ERC721) {\n ids = note.ids;\n _withdrawERC721s(IERC721(note.token), ids);\n } else if (protocol == Protocol.ERC1155) {\n ids = note.ids;\n amounts = note.amounts;\n _withdrawERC1155s(IERC1155(note.token), ids, amounts);\n }\n unchecked {\n ++i;\n }\n }\n }\n\n // @notice Withdraw ETH from this contract to the msg.sender\n // @param amount The amount of ETH to be withdrawn\n function withdrawETH(uint256 amount) external isPermitted(OWNER_ROLE) {\n _withdrawETH(amount);\n }\n\n // @notice Withdraw ERC20s\n // @param erc20s An array of erc20 addresses\n // @param amounts An array of amounts for each erc20\n function withdrawERC20s(\n IERC20[] calldata erc20s,\n uint256[] calldata amounts\n ) external isPermitted(OWNER_ROLE) {\n uint256 length = erc20s.length;\n if (amounts.length != length) revert InvalidArrayLength();\n for (uint256 i; i < length; ) {\n _withdrawERC20(erc20s[i], amounts[i]);\n unchecked {\n ++i;\n }\n }\n }\n\n // @notice Withdraw multiple ERC721 ids for a single ERC721 contract\n // @param erc721 The address of the ERC721 contract\n // @param ids An array of ids that are to be withdrawn\n function withdrawERC721s(\n IERC721 erc721,\n uint256[] calldata ids\n ) external isPermitted(OWNER_ROLE) {\n _withdrawERC721s(erc721, ids);\n }\n\n // @notice Withdraw multiple ERC1155 ids for a single ERC1155 contract\n // @param erc1155 The address of the ERC155 contract\n // @param ids An array of ids that are to be withdrawn\n // @param amounts An array of amounts per id\n function withdrawERC1155s(\n IERC1155 erc1155,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external isPermitted(OWNER_ROLE) {\n _withdrawERC1155s(erc1155, ids, amounts);\n }\n\n // @notice Revoke approval on an array of assets and operators\n // @dev Works for ERC20s, ERC721s, and ERC1155s\n // @param notes A tuple that contains the protocol id, token address, and array of operators\n function revokeApprovals(ApprovalNote[] calldata notes) external isPermitted(OWNER_ROLE) {\n ApprovalNote memory note;\n Protocol protocol;\n\n uint256 length = notes.length;\n for (uint256 i; i < length; ) {\n note = notes[i];\n protocol = note.protocol;\n if (protocol == Protocol.ERC20) {\n _revokeERC20Approvals(IERC20(note.token), note.operators);\n } else if (protocol == Protocol.ERC721) {\n _revokeERC721Approvals(IERC721(note.token), note.operators);\n } else if (protocol == Protocol.ERC1155) {\n _revokeERC1155Approvals(IERC1155(note.token), note.operators);\n }\n unchecked {\n ++i;\n }\n }\n }\n\n // @notice Revoke approval of an ERC20 for an array of operators\n // @param erc20 The address of the ERC20 token\n // @param operators The array of operators to have approval revoked\n function revokeERC20Approvals(\n IERC20 erc20,\n address[] calldata operators\n ) external isPermitted(OWNER_ROLE) {\n _revokeERC20Approvals(erc20, operators);\n }\n\n // @notice Revoke approval of an ERC721 for an array of operators\n // @param erc721 The address of the ERC721 token\n // @param operators The array of operators to have approval revoked\n function revokeERC721Approvals(\n IERC721 erc721,\n address[] calldata operators\n ) external isPermitted(OWNER_ROLE) {\n _revokeERC721Approvals(erc721, operators);\n }\n\n // @notice Revoke approval of an ERC1155 for an array of operators\n // @param erc1155 The address of the ERC1155 token\n // @param operators The array of operators to have approval revoked\n function revokeERC1155Approvals(\n IERC1155 erc1155,\n address[] calldata operators\n ) external isPermitted(OWNER_ROLE) {\n _revokeERC1155Approvals(erc1155, operators);\n }\n\n ////////////////////////////////////////////////////\n // Internal functions //////////////////////////////\n ////////////////////////////////////////////////////\n\n function _withdrawETH(uint256 amount) internal {\n (bool success, ) = msg.sender.call{value: amount}(\"\");\n if (!success) revert WithdrawFailed();\n }\n\n function _withdrawERC20(IERC20 erc20, uint256 amount) internal {\n erc20.safeTransfer(msg.sender, amount);\n }\n\n function _withdrawERC721s(IERC721 erc721, uint256[] memory ids) internal {\n uint256 length = ids.length;\n for (uint256 i; i < length; ) {\n erc721.safeTransferFrom(address(this), msg.sender, ids[i]);\n unchecked {\n ++i;\n }\n }\n }\n\n function _withdrawERC1155s(IERC1155 erc1155, uint256[] memory ids, uint256[] memory amounts) internal {\n // safeBatchTransferFrom will validate the array lengths\n erc1155.safeBatchTransferFrom(address(this), msg.sender, ids, amounts, \"\");\n }\n\n function _revokeERC20Approvals(IERC20 erc20, address[] memory operators) internal {\n uint256 length = operators.length;\n for (uint256 i; i < length; ) {\n erc20.safeApprove(operators[i], 0);\n unchecked {\n ++i;\n }\n }\n }\n\n function _revokeERC721Approvals(IERC721 erc721, address[] memory operators) internal {\n uint256 length = operators.length;\n for (uint256 i; i < length; ) {\n erc721.setApprovalForAll(operators[i], false);\n unchecked {\n ++i;\n }\n }\n }\n\n function _revokeERC1155Approvals(IERC1155 erc1155, address[] memory operators) internal {\n uint256 length = operators.length;\n for (uint256 i; i < length; ) {\n erc1155.setApprovalForAll(operators[i], false);\n unchecked {\n ++i;\n }\n }\n }\n\n ////////////////////////////////////////////////////\n // Fallback functions //////////////////////////////\n ////////////////////////////////////////////////////\n\n receive() external payable {}\n}\n" + }, + "contracts/wallet/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.16;\n\nimport \"../interfaces/IModuleManager.sol\";\nimport \"../access/ACL.sol\";\nimport \"../access/Roles.sol\";\n\nabstract contract ModuleManager is IModuleManager, ACL, Roles {\n\n error NoDelegateCalls();\n\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Operation operation\n ) public virtual isPermitted(MODULE_ROLE) returns (bool success) {\n if (operation != Operation.Call) revert NoDelegateCalls();\n success = _executeCall(to, value, data);\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n function _executeCall(\n address target,\n uint256 value,\n bytes memory data\n ) internal virtual returns (bool success);\n}" + } + }, + "settings": { + "viaIR": true, + "optimizer": { + "enabled": true, + "runs": 100000000 + }, + "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/hardhat.config.ts b/hardhat.config.ts index f7806a5..80b6c7d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -96,6 +96,11 @@ const config: HardhatUserConfig = { url: nodeUrl('base'), accounts: accounts('base'), saveDeployments: true, + }, + linea: { + url: nodeUrl('linea'), + accounts: accounts('linea'), + saveDeployments: true, } }), paths: {