From c46d1e8489175c08d8f7ce9c841664e5e011be2e Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 3 Dec 2024 13:54:02 +0100 Subject: [PATCH 1/2] reusable contract abis --- src/abis/CarbonController.abi.ts | 1758 +++++++++++++++++ src/abis/CarbonPOL.abi.ts | 969 +++++++++ src/abis/CarbonVortex.abi.ts | 600 ++++++ src/abis/CarbonVoucher.abi.ts | 942 +++++++++ src/abis/ProxyAdmin.abi.ts | 151 ++ src/deployment/deployment.service.ts | 84 +- .../pair-created-event.service.ts | 4 +- ...r-trading-fee-ppm-updated-event.service.ts | 4 +- .../strategy-created-event.service.ts | 4 +- .../strategy-deleted-event.service.ts | 4 +- .../strategy-updated-event.service.ts | 4 +- .../tokens-traded-event.service.ts | 4 +- .../trading-fee-ppm-updated-event.service.ts | 4 +- .../voucher-transfer-event.service.ts | 4 +- src/harvester/harvester.service.ts | 65 +- 15 files changed, 4540 insertions(+), 61 deletions(-) create mode 100644 src/abis/CarbonController.abi.ts create mode 100644 src/abis/CarbonPOL.abi.ts create mode 100644 src/abis/CarbonVortex.abi.ts create mode 100644 src/abis/CarbonVoucher.abi.ts create mode 100644 src/abis/ProxyAdmin.abi.ts diff --git a/src/abis/CarbonController.abi.ts b/src/abis/CarbonController.abi.ts new file mode 100644 index 0000000..14b8e51 --- /dev/null +++ b/src/abis/CarbonController.abi.ts @@ -0,0 +1,1758 @@ +export const CarbonController: any[] = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, + { + inputs: [], + name: 'AccessDenied', + type: 'error', + }, + { + inputs: [], + name: 'AlreadyInitialized', + type: 'error', + }, + { + inputs: [], + name: 'BalanceMismatch', + type: 'error', + }, + { + inputs: [], + name: 'DeadlineExpired', + type: 'error', + }, + { + inputs: [], + name: 'GreaterThanMaxInput', + type: 'error', + }, + { + inputs: [], + name: 'IdenticalAddresses', + type: 'error', + }, + { + inputs: [], + name: 'InsufficientCapacity', + type: 'error', + }, + { + inputs: [], + name: 'InsufficientLiquidity', + type: 'error', + }, + { + inputs: [], + name: 'InsufficientNativeTokenReceived', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAddress', + type: 'error', + }, + { + inputs: [], + name: 'InvalidFee', + type: 'error', + }, + { + inputs: [], + name: 'InvalidIndices', + type: 'error', + }, + { + inputs: [], + name: 'InvalidRate', + type: 'error', + }, + { + inputs: [], + name: 'InvalidTradeActionAmount', + type: 'error', + }, + { + inputs: [], + name: 'InvalidTradeActionStrategyId', + type: 'error', + }, + { + inputs: [], + name: 'LowerThanMinReturn', + type: 'error', + }, + { + inputs: [], + name: 'NativeAmountMismatch', + type: 'error', + }, + { + inputs: [], + name: 'OrderDisabled', + type: 'error', + }, + { + inputs: [], + name: 'OutDated', + type: 'error', + }, + { + inputs: [], + name: 'Overflow', + type: 'error', + }, + { + inputs: [], + name: 'PairAlreadyExists', + type: 'error', + }, + { + inputs: [], + name: 'PairDoesNotExist', + type: 'error', + }, + { + inputs: [], + name: 'UnknownDelegator', + type: 'error', + }, + { + inputs: [], + name: 'UnnecessaryNativeTokenReceived', + type: 'error', + }, + { + inputs: [], + name: 'ZeroValue', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'recipient', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'FeesWithdrawn', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint128', + name: 'pairId', + type: 'uint128', + }, + { + indexed: true, + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token1', + type: 'address', + }, + ], + name: 'PairCreated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + indexed: false, + internalType: 'uint32', + name: 'prevFeePPM', + type: 'uint32', + }, + { + indexed: false, + internalType: 'uint32', + name: 'newFeePPM', + type: 'uint32', + }, + ], + name: 'PairTradingFeePPMUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'Paused', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'previousAdminRole', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'newAdminRole', + type: 'bytes32', + }, + ], + name: 'RoleAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleRevoked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order0', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order1', + type: 'tuple', + }, + ], + name: 'StrategyCreated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order0', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order1', + type: 'tuple', + }, + ], + name: 'StrategyDeleted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + indexed: true, + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order0', + type: 'tuple', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + indexed: false, + internalType: 'struct Order', + name: 'order1', + type: 'tuple', + }, + { + indexed: false, + internalType: 'uint8', + name: 'reason', + type: 'uint8', + }, + ], + name: 'StrategyUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'trader', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'sourceToken', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'targetToken', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'sourceAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'targetAmount', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint128', + name: 'tradingFeeAmount', + type: 'uint128', + }, + { + indexed: false, + internalType: 'bool', + name: 'byTargetAmount', + type: 'bool', + }, + ], + name: 'TokensTraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint32', + name: 'prevFeePPM', + type: 'uint32', + }, + { + indexed: false, + internalType: 'uint32', + name: 'newFeePPM', + type: 'uint32', + }, + ], + name: 'TradingFeePPMUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'Unpaused', + type: 'event', + }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + ], + name: 'accumulatedFees', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'sourceToken', + type: 'address', + }, + { + internalType: 'Token', + name: 'targetToken', + type: 'address', + }, + { + components: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'amount', + type: 'uint128', + }, + ], + internalType: 'struct TradeAction[]', + name: 'tradeActions', + type: 'tuple[]', + }, + ], + name: 'calculateTradeSourceAmount', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'sourceToken', + type: 'address', + }, + { + internalType: 'Token', + name: 'targetToken', + type: 'address', + }, + { + components: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'amount', + type: 'uint128', + }, + ], + internalType: 'struct TradeAction[]', + name: 'tradeActions', + type: 'tuple[]', + }, + ], + name: 'calculateTradeTargetAmount', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'controllerType', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + ], + name: 'createPair', + outputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'id', + type: 'uint128', + }, + { + internalType: 'Token[2]', + name: 'tokens', + type: 'address[2]', + }, + ], + internalType: 'struct Pair', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + internalType: 'struct Order[2]', + name: 'orders', + type: 'tuple[2]', + }, + ], + name: 'createStrategy', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + ], + name: 'deleteStrategy', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'getRoleMember', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleMemberCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'hasRole', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + ], + name: 'pair', + outputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'id', + type: 'uint128', + }, + { + internalType: 'Token[2]', + name: 'tokens', + type: 'address[2]', + }, + ], + internalType: 'struct Pair', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + ], + name: 'pairTradingFeePPM', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pairs', + outputs: [ + { + internalType: 'Token[2][]', + name: '', + type: 'address[2][]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pause', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'paused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'postUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'roleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'roleEmergencyStopper', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'roleFeesManager', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + internalType: 'uint32', + name: 'newPairTradingFeePPM', + type: 'uint32', + }, + ], + name: 'setPairTradingFeePPM', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint32', + name: 'newTradingFeePPM', + type: 'uint32', + }, + ], + name: 'setTradingFeePPM', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + { + internalType: 'uint256', + name: 'startIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'endIndex', + type: 'uint256', + }, + ], + name: 'strategiesByPair', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'Token[2]', + name: 'tokens', + type: 'address[2]', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + internalType: 'struct Order[2]', + name: 'orders', + type: 'tuple[2]', + }, + ], + internalType: 'struct Strategy[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token0', + type: 'address', + }, + { + internalType: 'Token', + name: 'token1', + type: 'address', + }, + ], + name: 'strategiesByPairCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + ], + name: 'strategy', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'Token[2]', + name: 'tokens', + type: 'address[2]', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + internalType: 'struct Order[2]', + name: 'orders', + type: 'tuple[2]', + }, + ], + internalType: 'struct Strategy', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'sourceToken', + type: 'address', + }, + { + internalType: 'Token', + name: 'targetToken', + type: 'address', + }, + { + components: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'amount', + type: 'uint128', + }, + ], + internalType: 'struct TradeAction[]', + name: 'tradeActions', + type: 'tuple[]', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'minReturn', + type: 'uint128', + }, + ], + name: 'tradeBySourceAmount', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'sourceToken', + type: 'address', + }, + { + internalType: 'Token', + name: 'targetToken', + type: 'address', + }, + { + components: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'amount', + type: 'uint128', + }, + ], + internalType: 'struct TradeAction[]', + name: 'tradeActions', + type: 'tuple[]', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'maxInput', + type: 'uint128', + }, + ], + name: 'tradeByTargetAmount', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'tradingFeePPM', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'unpause', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'strategyId', + type: 'uint256', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + internalType: 'struct Order[2]', + name: 'currentOrders', + type: 'tuple[2]', + }, + { + components: [ + { + internalType: 'uint128', + name: 'y', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'z', + type: 'uint128', + }, + { + internalType: 'uint64', + name: 'A', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'B', + type: 'uint64', + }, + ], + internalType: 'struct Order[2]', + name: 'newOrders', + type: 'tuple[2]', + }, + ], + name: 'updateStrategy', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'recipient', + type: 'address', + }, + ], + name: 'withdrawFees', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, +]; diff --git a/src/abis/CarbonPOL.abi.ts b/src/abis/CarbonPOL.abi.ts new file mode 100644 index 0000000..b361a45 --- /dev/null +++ b/src/abis/CarbonPOL.abi.ts @@ -0,0 +1,969 @@ +export const CarbonPOL: any[] = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, + { + inputs: [], + name: 'AccessDenied', + type: 'error', + }, + { + inputs: [], + name: 'AlreadyInitialized', + type: 'error', + }, + { + inputs: [], + name: 'InsufficientAmountForTrading', + type: 'error', + }, + { + inputs: [], + name: 'InsufficientNativeTokenSent', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAddress', + type: 'error', + }, + { + inputs: [], + name: 'InvalidPrice', + type: 'error', + }, + { + inputs: [], + name: 'InvalidToken', + type: 'error', + }, + { + inputs: [], + name: 'InvalidTrade', + type: 'error', + }, + { + inputs: [], + name: 'Overflow', + type: 'error', + }, + { + inputs: [], + name: 'TradingDisabled', + type: 'error', + }, + { + inputs: [], + name: 'ZeroValue', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint128', + name: 'prevEthSaleAmount', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'newEthSaleAmount', + type: 'uint128', + }, + ], + name: 'EthSaleAmountUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint32', + name: 'prevMarketPriceMultiply', + type: 'uint32', + }, + { + indexed: false, + internalType: 'uint32', + name: 'newMarketPriceMultiply', + type: 'uint32', + }, + ], + name: 'MarketPriceMultiplyUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint128', + name: 'prevMinEthSaleAmount', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'newMinEthSaleAmount', + type: 'uint128', + }, + ], + name: 'MinEthSaleAmountUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint32', + name: 'prevPriceDecayHalfLife', + type: 'uint32', + }, + { + indexed: false, + internalType: 'uint32', + name: 'newPriceDecayHalfLife', + type: 'uint32', + }, + ], + name: 'PriceDecayHalfLifeUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + indexed: false, + internalType: 'struct ICarbonPOL.Price', + name: 'price', + type: 'tuple', + }, + ], + name: 'PriceUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'previousAdminRole', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'newAdminRole', + type: 'bytes32', + }, + ], + name: 'RoleAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleRevoked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + indexed: false, + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + name: 'TokenTraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + indexed: false, + internalType: 'struct ICarbonPOL.Price', + name: 'price', + type: 'tuple', + }, + ], + name: 'TradingEnabled', + type: 'event', + }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + ], + name: 'amountAvailableForTrading', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + components: [ + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + internalType: 'struct ICarbonPOL.Price', + name: 'price', + type: 'tuple', + }, + ], + name: 'enableTrading', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + internalType: 'struct ICarbonPOL.Price', + name: 'price', + type: 'tuple', + }, + ], + name: 'enableTradingETH', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'ethSaleAmount', + outputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'initial', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'current', + type: 'uint128', + }, + ], + internalType: 'struct ICarbonPOL.EthSaleAmount', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + name: 'expectedTradeInput', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + ], + name: 'expectedTradeReturn', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'getRoleMember', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleMemberCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'hasRole', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'marketPriceMultiply', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'minEthSaleAmount', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'postUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'priceDecayHalfLife', + outputs: [ + { + internalType: 'uint32', + name: '', + type: 'uint32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'roleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint128', + name: 'newEthSaleAmount', + type: 'uint128', + }, + ], + name: 'setEthSaleAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint32', + name: 'newMarketPriceMultiply', + type: 'uint32', + }, + ], + name: 'setMarketPriceMultiply', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint128', + name: 'newMinEthSaleAmount', + type: 'uint128', + }, + ], + name: 'setMinEthSaleAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint32', + name: 'newPriceDecayHalfLife', + type: 'uint32', + }, + ], + name: 'setPriceDecayHalfLife', + 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: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + ], + name: 'tokenPrice', + outputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'sourceAmount', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + internalType: 'struct ICarbonPOL.Price', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + { + internalType: 'uint128', + name: 'targetAmount', + type: 'uint128', + }, + ], + name: 'trade', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + ], + name: 'tradingEnabled', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, +]; diff --git a/src/abis/CarbonVortex.abi.ts b/src/abis/CarbonVortex.abi.ts new file mode 100644 index 0000000..16d9bff --- /dev/null +++ b/src/abis/CarbonVortex.abi.ts @@ -0,0 +1,600 @@ +export const CarbonVortex: any[] = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, + { + inputs: [], + name: 'AccessDenied', + type: 'error', + }, + { + inputs: [], + name: 'AlreadyInitialized', + type: 'error', + }, + { + inputs: [], + name: 'DuplicateToken', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAddress', + type: 'error', + }, + { + inputs: [], + name: 'InvalidFee', + type: 'error', + }, + { + inputs: [], + name: 'InvalidToken', + type: 'error', + }, + { + inputs: [], + name: 'InvalidTokenLength', + type: 'error', + }, + { + inputs: [], + name: 'Overflow', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'prevRewardsPPM', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newRewardsPPM', + type: 'uint256', + }, + ], + name: 'RewardsUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'previousAdminRole', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'newAdminRole', + type: 'bytes32', + }, + ], + name: 'RoleAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleRevoked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: false, + internalType: 'Token[]', + name: 'tokens', + type: 'address[]', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'rewardAmounts', + type: 'uint256[]', + }, + { + indexed: false, + internalType: 'uint256', + name: 'burnAmount', + type: 'uint256', + }, + ], + name: 'TokensBurned', + type: 'event', + }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token', + name: 'token', + type: 'address', + }, + ], + name: 'availableTokens', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'Token[]', + name: 'tokens', + type: 'address[]', + }, + ], + name: 'execute', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'getRoleMember', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleMemberCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'hasRole', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'postUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'rewardsPPM', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'roleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'newRewardsPPM', + type: 'uint256', + }, + ], + name: 'setRewardsPPM', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalBurned', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, +]; diff --git a/src/abis/CarbonVoucher.abi.ts b/src/abis/CarbonVoucher.abi.ts new file mode 100644 index 0000000..f4dce60 --- /dev/null +++ b/src/abis/CarbonVoucher.abi.ts @@ -0,0 +1,942 @@ +export const CarbonVoucher: any[] = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + stateMutability: 'payable', + type: 'fallback', + }, + { + inputs: [], + name: 'admin', + outputs: [ + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'implementation', + outputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, + { + inputs: [], + name: 'AccessDenied', + type: 'error', + }, + { + inputs: [], + name: 'AlreadyInitialized', + type: 'error', + }, + { + inputs: [], + name: 'BatchNotSupported', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAddress', + type: 'error', + }, + { + inputs: [], + name: 'InvalidIndices', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'approved', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'ApprovalForAll', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'newBaseExtension', + type: 'string', + }, + ], + name: 'BaseExtensionUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'newBaseURI', + type: 'string', + }, + ], + name: 'BaseURIUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'previousAdminRole', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'newAdminRole', + type: 'bytes32', + }, + ], + name: 'RoleAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleGranted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + ], + name: 'RoleRevoked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'bool', + name: 'newUseGlobalURI', + type: 'bool', + }, + ], + name: 'UseGlobalURIUpdated', + type: 'event', + }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'burn', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'getApproved', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'getRoleMember', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + ], + name: 'getRoleMemberCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'hasRole', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bool', + name: 'newUseGlobalURI', + type: 'bool', + }, + { + internalType: 'string', + name: 'newBaseURI', + type: 'string', + }, + { + internalType: 'string', + name: 'newBaseExtension', + type: 'string', + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'mint', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'ownerOf', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'postUpgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'role', + type: 'bytes32', + }, + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'roleAdmin', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'roleMinter', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'newBaseExtension', + type: 'string', + }, + ], + name: 'setBaseExtension', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'string', + name: 'newBaseURI', + type: 'string', + }, + ], + name: 'setBaseURI', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4', + }, + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: 'startIndex', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'endIndex', + type: 'uint256', + }, + ], + name: 'tokensByOwner', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bool', + name: 'newUseGlobalURI', + type: 'bool', + }, + ], + name: 'useGlobalURI', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'uint16', + name: '', + type: 'uint16', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_logic', + type: 'address', + }, + { + internalType: 'address', + name: 'admin_', + type: 'address', + }, + { + internalType: 'bytes', + name: '_data', + type: 'bytes', + }, + ], + stateMutability: 'payable', + type: 'constructor', + }, +]; diff --git a/src/abis/ProxyAdmin.abi.ts b/src/abis/ProxyAdmin.abi.ts new file mode 100644 index 0000000..4f51ce9 --- /dev/null +++ b/src/abis/ProxyAdmin.abi.ts @@ -0,0 +1,151 @@ +export const ProxyAdmin: any[] = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + inputs: [ + { + internalType: 'contract TransparentUpgradeableProxy', + name: 'proxy', + type: 'address', + }, + { + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'changeProxyAdmin', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract TransparentUpgradeableProxy', + name: 'proxy', + type: 'address', + }, + ], + name: 'getProxyAdmin', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract TransparentUpgradeableProxy', + name: 'proxy', + type: 'address', + }, + ], + name: 'getProxyImplementation', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract TransparentUpgradeableProxy', + name: 'proxy', + type: 'address', + }, + { + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'upgrade', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract TransparentUpgradeableProxy', + name: 'proxy', + type: 'address', + }, + { + internalType: 'address', + name: 'implementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, +]; diff --git a/src/deployment/deployment.service.ts b/src/deployment/deployment.service.ts index abcc373..1753ba0 100644 --- a/src/deployment/deployment.service.ts +++ b/src/deployment/deployment.service.ts @@ -34,12 +34,16 @@ export interface Deployment { gasToken: GasToken; startBlock: number; nativeTokenAlias?: string; + contracts: { + [contractName: string]: { + address: string; + }; + }; } @Injectable() export class DeploymentService { private deployments: Deployment[]; - constructor(private configService: ConfigService) { this.deployments = this.initializeDeployments(); } @@ -59,6 +63,23 @@ export class DeploymentService { symbol: 'ETH', address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', }, + contracts: { + CarbonController: { + address: '0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1', + }, + CarbonVortex: { + address: '0xba7d1581Db6248DC9177466a328BF457703c8f84', + }, + CarbonPOL: { + address: '0xD06146D292F9651C1D7cf54A3162791DFc2bEf46', + }, + ProxyAdmin: { + address: '0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8', + }, + CarbonVoucher: { + address: '0x3660F04B79751e31128f6378eAC70807e38f554E', + }, + }, }, { exchangeId: ExchangeId.OGSei, @@ -74,6 +95,17 @@ export class DeploymentService { address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', }, nativeTokenAlias: '0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7', + contracts: { + CarbonController: { + address: '0xe4816658ad10bF215053C533cceAe3f59e1f1087', + }, + ProxyAdmin: { + address: '0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8', + }, + CarbonVoucher: { + address: '0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5', + }, + }, }, { exchangeId: ExchangeId.OGCelo, @@ -89,21 +121,43 @@ export class DeploymentService { address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', }, nativeTokenAlias: '0x471ece3750da237f93b8e339c536989b8978a438', + contracts: { + CarbonController: { + address: '0x6619871118D144c1c28eC3b23036FC1f0829ed3a', + }, + ProxyAdmin: { + address: '0x0f54099D787e26c90c487625B4dE819eC5A9BDAA', + }, + CarbonVoucher: { + address: '0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A', + }, + }, + }, + { + exchangeId: ExchangeId.OGBlast, + blockchainType: BlockchainType.Blast, + rpcEndpoint: this.configService.get('BLAST_RPC_ENDPOINT'), + harvestEventsBatchSize: 1000, + harvestConcurrency: 5, + multicallAddress: '0xcA11bde05977b3631167028862bE2a173976CA11', + startBlock: 6257000, + gasToken: { + name: 'Blast', + symbol: 'BLAST', + address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + }, + contracts: { + CarbonController: { + address: '0xfBF49e30Ed1b610E24148c23D32eD5f3F2fC5Dba', + }, + CarbonVoucher: { + address: '0xfA76DcA90d334C8fD3Ae479f9B4c32a31A37eDB1', + }, + ProxyAdmin: { + address: '0x2478dD2394AD4B28D318Ec69Ee32acaa2b30A4b6', + }, + }, }, - // { - // exchangeId: ExchangeId.OGBlast, - // blockchainType: BlockchainType.Blast, - // rpcEndpoint: this.configService.get('BLAST_RPC_ENDPOINT'), - // harvestEventsBatchSize: 1000, - // harvestConcurrency: 5, - // multicallAddress: '0xcA11bde05977b3631167028862bE2a173976CA11', - // startBlock: 6257000, - // gasToken: { - // name: 'Blast', - // symbol: 'BLAST', - // address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', - // }, - // }, ]; } diff --git a/src/events/pair-created-event/pair-created-event.service.ts b/src/events/pair-created-event/pair-created-event.service.ts index 6151bc1..598dd6d 100644 --- a/src/events/pair-created-event/pair-created-event.service.ts +++ b/src/events/pair-created-event/pair-created-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { PairCreatedEvent } from './pair-created-event.entity'; -import { HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, HarvesterService } from '../../harvester/harvester.service'; import { Deployment } from '../../deployment/deployment.service'; @Injectable() @@ -16,7 +16,7 @@ export class PairCreatedEventService { async update(endBlock: number, deployment: Deployment): Promise { return this.harvesterService.processEvents({ entity: 'pair-created-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'PairCreated', endBlock, repository: this.repository, diff --git a/src/events/pair-trading-fee-ppm-updated-event/pair-trading-fee-ppm-updated-event.service.ts b/src/events/pair-trading-fee-ppm-updated-event/pair-trading-fee-ppm-updated-event.service.ts index a8e0f02..6dd5c65 100644 --- a/src/events/pair-trading-fee-ppm-updated-event/pair-trading-fee-ppm-updated-event.service.ts +++ b/src/events/pair-trading-fee-ppm-updated-event/pair-trading-fee-ppm-updated-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { PairTradingFeePpmUpdatedEvent } from './pair-trading-fee-ppm-updated-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { PairsDictionary } from '../../pair/pair.service'; import { TokensByAddress } from '../../token/token.service'; import { Deployment } from '../../deployment/deployment.service'; @@ -27,7 +27,7 @@ export class PairTradingFeePpmUpdatedEventService { ): Promise { return this.harvesterService.processEvents({ entity: 'pair-trading-fee-ppm-updated-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'PairTradingFeePPMUpdated', endBlock, repository: this.repository, diff --git a/src/events/strategy-created-event/strategy-created-event.service.ts b/src/events/strategy-created-event/strategy-created-event.service.ts index dd751b8..68bb8b1 100644 --- a/src/events/strategy-created-event/strategy-created-event.service.ts +++ b/src/events/strategy-created-event/strategy-created-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { StrategyCreatedEvent } from './strategy-created-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { PairsDictionary } from '../../pair/pair.service'; import { TokensByAddress } from '../../token/token.service'; import { BigNumber } from '@ethersproject/bignumber'; @@ -24,7 +24,7 @@ export class StrategyCreatedEventService { ): Promise { return this.harvesterService.processEvents({ entity: 'strategy-created-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'StrategyCreated', endBlock, repository: this.repository, diff --git a/src/events/strategy-deleted-event/strategy-deleted-event.service.ts b/src/events/strategy-deleted-event/strategy-deleted-event.service.ts index 49af64e..7f4c5a6 100644 --- a/src/events/strategy-deleted-event/strategy-deleted-event.service.ts +++ b/src/events/strategy-deleted-event/strategy-deleted-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { StrategyDeletedEvent } from './strategy-deleted-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { PairsDictionary } from '../../pair/pair.service'; import { TokensByAddress } from '../../token/token.service'; import { BigNumber } from '@ethersproject/bignumber'; @@ -24,7 +24,7 @@ export class StrategyDeletedEventService { ): Promise { return this.harvesterService.processEvents({ entity: 'strategy-deleted-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'StrategyDeleted', endBlock, repository: this.repository, diff --git a/src/events/strategy-updated-event/strategy-updated-event.service.ts b/src/events/strategy-updated-event/strategy-updated-event.service.ts index 98e59c2..759a776 100644 --- a/src/events/strategy-updated-event/strategy-updated-event.service.ts +++ b/src/events/strategy-updated-event/strategy-updated-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { StrategyUpdatedEvent } from './strategy-updated-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { PairsDictionary } from '../../pair/pair.service'; import { TokensByAddress } from '../../token/token.service'; import { BigNumber } from '@ethersproject/bignumber'; @@ -35,7 +35,7 @@ export class StrategyUpdatedEventService { ): Promise { return this.harvesterService.processEvents({ entity: 'strategy-updated-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'StrategyUpdated', endBlock, repository: this.repository, diff --git a/src/events/tokens-traded-event/tokens-traded-event.service.ts b/src/events/tokens-traded-event/tokens-traded-event.service.ts index 6bbcf3b..a3773c2 100644 --- a/src/events/tokens-traded-event/tokens-traded-event.service.ts +++ b/src/events/tokens-traded-event/tokens-traded-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { TokensTradedEvent } from './tokens-traded-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { PairsDictionary } from '../../pair/pair.service'; import { TokensByAddress } from '../../token/token.service'; import Decimal from 'decimal.js'; @@ -39,7 +39,7 @@ export class TokensTradedEventService { ): Promise { return this.harvesterService.processEvents({ entity: 'tokens-traded-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'TokensTraded', endBlock, repository: this.repository, diff --git a/src/events/trading-fee-ppm-updated-event/trading-fee-ppm-updated-event.service.ts b/src/events/trading-fee-ppm-updated-event/trading-fee-ppm-updated-event.service.ts index 2278835..1cdc9c9 100644 --- a/src/events/trading-fee-ppm-updated-event/trading-fee-ppm-updated-event.service.ts +++ b/src/events/trading-fee-ppm-updated-event/trading-fee-ppm-updated-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { TradingFeePpmUpdatedEvent } from './trading-fee-ppm-updated-event.entity'; -import { HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, HarvesterService } from '../../harvester/harvester.service'; import { Deployment } from '../../deployment/deployment.service'; @Injectable() @@ -31,7 +31,7 @@ export class TradingFeePpmUpdatedEventService { async update(endBlock: number, deployment: Deployment): Promise { return this.harvesterService.processEvents({ entity: 'trading-fee-ppm-updated-events', - contractName: 'CarbonController', + contractName: ContractsNames.CarbonController, eventName: 'TradingFeePPMUpdated', endBlock, repository: this.repository, diff --git a/src/events/voucher-transfer-event/voucher-transfer-event.service.ts b/src/events/voucher-transfer-event/voucher-transfer-event.service.ts index 98b4a05..49c825d 100644 --- a/src/events/voucher-transfer-event/voucher-transfer-event.service.ts +++ b/src/events/voucher-transfer-event/voucher-transfer-event.service.ts @@ -2,7 +2,7 @@ import { Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; import { VoucherTransferEvent } from './voucher-transfer-event.entity'; -import { CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; +import { ContractsNames, CustomFnArgs, HarvesterService } from '../../harvester/harvester.service'; import { BigNumber } from '@ethersproject/bignumber'; import { Deployment } from '../../deployment/deployment.service'; @@ -28,7 +28,7 @@ export class VoucherTransferEventService { async update(endBlock: number, deployment: Deployment): Promise { return this.harvesterService.processEvents({ entity: 'voucher-transfer-events', - contractName: 'Voucher', + contractName: ContractsNames.CarbonVoucher, eventName: 'Transfer', endBlock, repository: this.repository, diff --git a/src/harvester/harvester.service.ts b/src/harvester/harvester.service.ts index f62a705..e41ba21 100644 --- a/src/harvester/harvester.service.ts +++ b/src/harvester/harvester.service.ts @@ -7,6 +7,11 @@ import { PairsDictionary } from '../pair/pair.service'; import { BlockService, BlocksDictionary } from '../block/block.service'; import { Quote } from '../quote/quote.entity'; import { ERC20 } from '../abis/erc20.abi'; +import { ProxyAdmin } from '../abis/ProxyAdmin.abi'; +import { CarbonController } from '../abis/CarbonController.abi'; +import { CarbonPOL } from '../abis/CarbonPOL.abi'; +import { CarbonVortex } from '../abis/CarbonVortex.abi'; +import { CarbonVoucher } from '../abis/CarbonVoucher.abi'; import moment from 'moment'; import { MulticallAbiEthereum } from '../abis/multicall.abi'; import { multicallAbiSei } from '../abis/multicall.abi'; @@ -20,6 +25,24 @@ export const VERSIONS = { // PoolMigrator: [{ terminatesAt: 14830503, version: 1 }, { version: 2 }], }; +export enum ContractsNames { + ERC20 = 'ERC20', + ProxyAdmin = 'ProxyAdmin', + CarbonController = 'CarbonController', + CarbonPOL = 'CarbonPOL', + CarbonVortex = 'CarbonVortex', + CarbonVoucher = 'CarbonVoucher', +} + +const Contracts = { + [ContractsNames.ERC20]: ERC20, + [ContractsNames.ProxyAdmin]: ProxyAdmin, + [ContractsNames.CarbonController]: CarbonController, + [ContractsNames.CarbonPOL]: CarbonPOL, + [ContractsNames.CarbonVortex]: CarbonVortex, + [ContractsNames.CarbonVoucher]: CarbonVoucher, +}; + export interface ConstantField { key: string; value: any; @@ -32,7 +55,7 @@ interface SourceMapItem { export interface ProcessEventsArgs { entity: string; contractAddress?: string; - contractName?: string; + contractName?: ContractsNames; eventName: string; endBlock: number; repository: Repository; @@ -103,7 +126,7 @@ export class HarvesterService { ) {} async fetchEventsFromBlockchain( - contractName: string, + contractName: ContractsNames, eventName: string, fromBlock: number, toBlock: number, @@ -159,35 +182,17 @@ export class HarvesterService { return events; } - getContract(contractName: string, version?: number, address?: string, deployment?: Deployment): any { - const web3 = new Web3(deployment.rpcEndpoint); // Use rpcEndpoint from deployment - let contract; - if (contractName === ContractNames.ERC20) { - contract = new web3.eth.Contract(ERC20, address); - } else { - const contractsEnv = deployment.exchangeId; - let path = `../contracts/${contractsEnv}/${contractName}`; - if (version) path += `V${version}`; - path += '.json'; - // eslint-disable-next-line @typescript-eslint/no-var-requires - const contractJson = require(path); - - let _address; - if (address) { - _address = address; - } else { - let configName = camelToSnakeCase(contractName).toUpperCase(); - if (configName[0] === '_') configName = configName.substring(1); - const configValue = process.env[configName]; - if (configValue) { - _address = configValue; - } else { - _address = contractJson.address; - } - } - contract = new web3.eth.Contract(contractJson.abi, _address); + getContract(contractName: ContractsNames, version?: number, address?: string, deployment?: Deployment): any { + const web3 = new Web3(deployment.rpcEndpoint); + + // Determine contract address + const contractAddress = address || deployment?.contracts[contractName]?.address; + if (!contractAddress) { + throw new Error(`Contract ${contractName} address not found in deployment configuration`); } - return contract; + + // Create and return contract instance + return new web3.eth.Contract(Contracts[contractName], contractAddress); } async processEvents(args: ProcessEventsArgs): Promise { From 456037a8792eb2079e7e813478500515731f154c Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 3 Dec 2024 14:03:07 +0100 Subject: [PATCH 2/2] cleanup --- package.json | 1 - src/contracts/blast/CarbonController.json | 1842 ------------- .../CarbonController_Implementation.json | 2271 ---------------- .../blast/CarbonController_Proxy.json | 278 -- src/contracts/blast/ProxyAdmin.json | 246 -- src/contracts/blast/Voucher.json | 1094 -------- .../blast/Voucher_Implementation.json | 1454 ---------- src/contracts/blast/Voucher_Proxy.json | 257 -- src/contracts/celo/CarbonController.json | 1865 ------------- .../celo/CarbonController_Implementation.json | 2278 ---------------- .../celo/CarbonController_Proxy.json | 299 --- src/contracts/celo/ProxyAdmin.json | 246 -- src/contracts/celo/Voucher.json | 1113 -------- .../celo/Voucher_Implementation.json | 1456 ---------- src/contracts/celo/Voucher_Proxy.json | 272 -- src/contracts/ethereum/CarbonController.json | 1935 -------------- .../CarbonController_Implementation.json | 2377 ----------------- .../ethereum/CarbonController_Proxy.json | 303 --- src/contracts/ethereum/CarbonPOL.json | 1128 -------- .../ethereum/CarbonPOL_Implementation.json | 1481 ---------- src/contracts/ethereum/CarbonPOL_Proxy.json | 285 -- src/contracts/ethereum/CarbonVortex.json | 747 ------ .../ethereum/CarbonVortex_Implementation.json | 875 ------ .../ethereum/CarbonVortex_Proxy.json | 273 -- src/contracts/ethereum/ProxyAdmin.json | 246 -- src/contracts/ethereum/Voucher.json | 1094 -------- .../ethereum/Voucher_Implementation.json | 1371 ---------- src/contracts/ethereum/Voucher_Proxy.json | 276 -- src/contracts/sei/CarbonController.json | 1854 ------------- .../sei/CarbonController_Implementation.json | 2278 ---------------- src/contracts/sei/CarbonController_Proxy.json | 288 -- src/contracts/sei/ProxyAdmin.json | 246 -- src/contracts/sei/Voucher.json | 1102 -------- src/contracts/sei/Voucher_Implementation.json | 1456 ---------- src/contracts/sei/Voucher_Proxy.json | 261 -- 35 files changed, 34848 deletions(-) delete mode 100644 src/contracts/blast/CarbonController.json delete mode 100644 src/contracts/blast/CarbonController_Implementation.json delete mode 100644 src/contracts/blast/CarbonController_Proxy.json delete mode 100644 src/contracts/blast/ProxyAdmin.json delete mode 100644 src/contracts/blast/Voucher.json delete mode 100644 src/contracts/blast/Voucher_Implementation.json delete mode 100644 src/contracts/blast/Voucher_Proxy.json delete mode 100644 src/contracts/celo/CarbonController.json delete mode 100644 src/contracts/celo/CarbonController_Implementation.json delete mode 100644 src/contracts/celo/CarbonController_Proxy.json delete mode 100644 src/contracts/celo/ProxyAdmin.json delete mode 100644 src/contracts/celo/Voucher.json delete mode 100644 src/contracts/celo/Voucher_Implementation.json delete mode 100644 src/contracts/celo/Voucher_Proxy.json delete mode 100644 src/contracts/ethereum/CarbonController.json delete mode 100644 src/contracts/ethereum/CarbonController_Implementation.json delete mode 100644 src/contracts/ethereum/CarbonController_Proxy.json delete mode 100644 src/contracts/ethereum/CarbonPOL.json delete mode 100644 src/contracts/ethereum/CarbonPOL_Implementation.json delete mode 100644 src/contracts/ethereum/CarbonPOL_Proxy.json delete mode 100644 src/contracts/ethereum/CarbonVortex.json delete mode 100644 src/contracts/ethereum/CarbonVortex_Implementation.json delete mode 100644 src/contracts/ethereum/CarbonVortex_Proxy.json delete mode 100644 src/contracts/ethereum/ProxyAdmin.json delete mode 100644 src/contracts/ethereum/Voucher.json delete mode 100644 src/contracts/ethereum/Voucher_Implementation.json delete mode 100644 src/contracts/ethereum/Voucher_Proxy.json delete mode 100644 src/contracts/sei/CarbonController.json delete mode 100644 src/contracts/sei/CarbonController_Implementation.json delete mode 100644 src/contracts/sei/CarbonController_Proxy.json delete mode 100644 src/contracts/sei/ProxyAdmin.json delete mode 100644 src/contracts/sei/Voucher.json delete mode 100644 src/contracts/sei/Voucher_Implementation.json delete mode 100644 src/contracts/sei/Voucher_Proxy.json diff --git a/package.json b/package.json index 6a0ee48..e40ef66 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "test:debug": "TZ=UTC node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand --watch", "test:e2e": "jest --config ./test/jest-e2e.json", "gcloud:build:production": "CLOUDSDK_CORE_PROJECT=bancor-api gcloud builds submit --tag europe-west2-docker.pkg.dev/bancor-api/carbon-multi/carbon-multi --timeout 3600", - "compile-abis": "typechain --target ethers-v5 --out-dir \"src/abis/types\" \"src/abis/*.json\"", "migration:create": "read -p 'Enter migration name: ' NAME && if [ -z \"$NAME\" ]; then echo 'Error: Migration name is required!' && exit 1; else typeorm-ts-node-commonjs migration:create src/migrations/$NAME; fi", "migration:generate": "npm run build && read -p 'Enter migration name: ' NAME && if [ -z \"$NAME\" ]; then echo 'Error: Migration name is required!' && exit 1; else typeorm-ts-node-commonjs migration:generate src/migrations/$NAME -d src/typeorm.config.ts; fi", "migration:run": "npm run build && typeorm-ts-node-commonjs migration:run -d src/typeorm.config.ts", diff --git a/src/contracts/blast/CarbonController.json b/src/contracts/blast/CarbonController.json deleted file mode 100644 index 8c39f9e..0000000 --- a/src/contracts/blast/CarbonController.json +++ /dev/null @@ -1,1842 +0,0 @@ -{ - "address": "0xfBF49e30Ed1b610E24148c23D32eD5f3F2fC5Dba", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "transactionIndex": 0, - "gasUsed": "857050", - "logsBloom": "0x000040048200000008020000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000001000000000000000000000000000000000200004000000000001008000000008000000000200000000000000000000140000000000000000000000000000000000000a0000000000001800000000000000400000000000000000400000040000000000000001000000000000000000020000002000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279", - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000008ce318919438982514f9f479fdfb40d32c6ab749" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 1, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 6, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - } - ], - "blockNumber": 79146720, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": ["0x8cE318919438982514F9f479FDfB40D32C6ab749", "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", "0x8129fc1c"], - "numDeployments": 2, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "postUpgrade", - "args": ["0x"] - }, - "implementation": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/src/contracts/blast/CarbonController_Implementation.json b/src/contracts/blast/CarbonController_Implementation.json deleted file mode 100644 index 840d852..0000000 --- a/src/contracts/blast/CarbonController_Implementation.json +++ /dev/null @@ -1,2271 +0,0 @@ -{ - "address": "0xB0e75cB1ABfE3E8b8Ac91103A019647AA57933A1", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IVoucher", - "name": "initVoucher", - "type": "address" - }, - { - "internalType": "address", - "name": "proxy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "transactionIndex": 0, - "gasUsed": "5363223", - "logsBloom": "0x000000048200000008000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000204000000000000000000000000000000000000000000000000200004000000000000008000000000000000000200000000000000000000140000000000000000000000000000000000000a0000000000000000000000000000400000000000000000400000040000000000000001000000004000000000000000000000000000000040000000000000040000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4", - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": ["0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 0, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - } - ], - "blockNumber": 79146734, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": ["0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", "0xe4816658ad10bF215053C533cceAe3f59e1f1087"], - "numDeployments": 2, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVoucher\",\"name\":\"initVoucher\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BalanceMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientCapacity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionStrategyId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowerThanMinReturn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeAmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OrderDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutDated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnknownDelegator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"pairId\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"PairTradingFeePPMUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"reason\",\"type\":\"uint8\"}],\"name\":\"StrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"tradingFeeAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"byTargetAmount\",\"type\":\"bool\"}],\"name\":\"TokensTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"TradingFeePPMUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"accumulatedFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeSourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controllerType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"}],\"name\":\"deleteStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pairTradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairs\",\"outputs\":[{\"internalType\":\"Token[2][]\",\"name\":\"\",\"type\":\"address[2][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleFeesManager\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newPairTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setPairTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"strategiesByPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"strategiesByPairCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"strategy\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"minReturn\",\"type\":\"uint128\"}],\"name\":\"tradeBySourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"tradeByTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"currentOrders\",\"type\":\"tuple[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"newOrders\",\"type\":\"tuple[2]\"}],\"name\":\"updateStrategy\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Carbon Controller contract\",\"events\":{\"FeesWithdrawn(address,address,uint256,address)\":{\"details\":\"triggered when fees are withdrawn\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PairCreated(uint128,address,address)\":{\"details\":\"triggered when a new pair is created\"},\"PairTradingFeePPMUpdated(address,address,uint32,uint32)\":{\"details\":\"triggered when the custom trading fee for a given pair is updated\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is created\"},\"StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is deleted\"},\"StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)\":{\"details\":\"triggered when a strategy is updated\"},\"TokensTraded(address,address,address,uint256,uint256,uint128,bool)\":{\"details\":\"triggered when tokens are traded\"},\"TradingFeePPMUpdated(uint32,uint32)\":{\"details\":\"triggered when the network fee is updated\"}},\"kind\":\"dev\",\"methods\":{\"accumulatedFees(address)\":{\"details\":\"returns the amount of fees accumulated for the specified token\"},\"calculateTradeSourceAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the source amount required when trading by target amount\"},\"calculateTradeTargetAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the target amount expected when trading by source amount\"},\"constructor\":{\"details\":\"used to set immutable state variables and initialize the implementation\"},\"controllerType()\":{\"details\":\"returns the type of the controller\"},\"createPair(address,address)\":{\"details\":\"creates a new pair of provided token0 and token1\"},\"createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any\"},\"deleteStrategy(uint256)\":{\"details\":\"deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"pair(address,address)\":{\"details\":\"returns a pair's metadata matching the provided token0 and token1\"},\"pairTradingFeePPM(address,address)\":{\"details\":\"returns the trading fee for a given pair (in units of PPM)\"},\"pairs()\":{\"details\":\"returns a list of all supported pairs\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"roleFeesManager()\":{\"details\":\"returns the fees manager role\"},\"setPairTradingFeePPM(address,address,uint32)\":{\"details\":\"sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"setTradingFeePPM(uint32)\":{\"details\":\"sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"strategiesByPair(address,address,uint256,uint256)\":{\"details\":\"returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex\"},\"strategiesByPairCount(address,address)\":{\"details\":\"returns the count of strategies belonging to a specific pair\"},\"strategy(uint256)\":{\"details\":\"returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradingFeePPM()\":{\"details\":\"returns the trading fee (in units of PPM)\"},\"updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any\"},\"withdrawFees(address,uint256,address)\":{\"details\":\"transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/carbon/CarbonController.sol\":\"CarbonController\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"contracts/carbon/CarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Pairs, Pair } from \\\"./Pairs.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Strategies, Strategy, TradeAction, Order, TradeTokens } from \\\"./Strategies.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { ICarbonController } from \\\"./interfaces/ICarbonController.sol\\\";\\nimport { Utils, AccessDenied } from \\\"../utility/Utils.sol\\\";\\nimport { OnlyProxyDelegate } from \\\"../utility/OnlyProxyDelegate.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev Carbon Controller contract\\n */\\ncontract CarbonController is\\n ICarbonController,\\n Pairs,\\n Strategies,\\n Upgradeable,\\n ReentrancyGuardUpgradeable,\\n OnlyProxyDelegate,\\n Utils\\n{\\n // the fees manager role is required to withdraw fees\\n bytes32 private constant ROLE_FEES_MANAGER = keccak256(\\\"ROLE_FEES_MANAGER\\\");\\n\\n uint16 private constant CONTROLLER_TYPE = 1;\\n\\n // deprecated parent storage vars\\n bool private _deprecated;\\n uint256[49] private __deprecated;\\n\\n // the voucher contract\\n IVoucher private immutable _voucher;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP] private __gap;\\n\\n error IdenticalAddresses();\\n error UnnecessaryNativeTokenReceived();\\n error InsufficientNativeTokenReceived();\\n error DeadlineExpired();\\n\\n /**\\n * @dev used to set immutable state variables and initialize the implementation\\n */\\n constructor(IVoucher initVoucher, address proxy) OnlyProxyDelegate(proxy) {\\n _validAddress(address(initVoucher));\\n\\n _voucher = initVoucher;\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonController_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonController_init() internal onlyInitializing {\\n __Pairs_init();\\n __Strategies_init();\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonController_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonController_init_unchained() internal onlyInitializing {\\n // set up administrative roles\\n _setRoleAdmin(ROLE_FEES_MANAGER, ROLE_ADMIN);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure virtual override(IVersioned, Upgradeable) returns (uint16) {\\n return 6;\\n }\\n\\n /**\\n * @dev returns the fees manager role\\n */\\n function roleFeesManager() external pure returns (bytes32) {\\n return ROLE_FEES_MANAGER;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function controllerType() external pure virtual returns (uint16) {\\n return CONTROLLER_TYPE;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradingFeePPM() external view returns (uint32) {\\n return _tradingFeePPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32) {\\n Pair memory _pair = _pair(token0, token1);\\n return _getPairTradingFeePPM(_pair.id);\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTradingFeePPM(uint32 newTradingFeePPM) external onlyAdmin validFee(newTradingFeePPM) {\\n _setTradingFeePPM(newTradingFeePPM);\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPairTradingFeePPM(\\n Token token0,\\n Token token1,\\n uint32 newPairTradingFeePPM\\n ) external onlyAdmin validFee(newPairTradingFeePPM) {\\n Pair memory _pair = _pair(token0, token1);\\n _setPairTradingFeePPM(_pair, newPairTradingFeePPM);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createPair(Token token0, Token token1) external nonReentrant onlyProxyDelegate returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _createPair(token0, token1);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairs() external view returns (Token[2][] memory) {\\n return _pairs();\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _pair(token0, token1);\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createStrategy(\\n Token token0,\\n Token token1,\\n Order[2] calldata orders\\n ) external payable nonReentrant onlyProxyDelegate returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !token0.isNative() && !token1.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(orders);\\n\\n // create the pair if it does not exist\\n Pair memory strategyPair;\\n if (!_pairExists(token0, token1)) {\\n strategyPair = _createPair(token0, token1);\\n } else {\\n strategyPair = _pair(token0, token1);\\n }\\n\\n Token[2] memory tokens = [token0, token1];\\n return _createStrategy(_voucher, tokens, orders, strategyPair, msg.sender, msg.value);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable nonReentrant onlyProxyDelegate {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !strategyPair.tokens[0].isNative() && !strategyPair.tokens[1].isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(newOrders);\\n\\n // perform update\\n _updateStrategy(strategyId, currentOrders, newOrders, strategyPair, msg.sender, msg.value);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function deleteStrategy(uint256 strategyId) external nonReentrant onlyProxyDelegate {\\n // find strategy, reverts if none\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // delete strategy\\n _deleteStrategy(strategyId, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategy(uint256 id) external view returns (Strategy memory) {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(id));\\n return _strategy(id, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPair(strategyPair, startIndex, endIndex, _voucher);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPairCount(strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, minReturn);\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: false,\\n constraint: minReturn,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, maxInput);\\n\\n if (sourceToken.isNative()) {\\n // tx's value should at least match the maxInput\\n if (msg.value < maxInput) {\\n revert InsufficientNativeTokenReceived();\\n }\\n }\\n\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: true,\\n constraint: maxInput,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, true);\\n return amounts.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, false);\\n return amounts.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function accumulatedFees(Token token) external view validAddress(Token.unwrap(token)) returns (uint256) {\\n return _accumulatedFees[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function withdrawFees(\\n Token token,\\n uint256 amount,\\n address recipient\\n )\\n external\\n onlyRoleMember(ROLE_FEES_MANAGER)\\n validAddress(recipient)\\n validAddress(Token.unwrap(token))\\n greaterThanZero(amount)\\n nonReentrant\\n returns (uint256)\\n {\\n return _withdrawFees(msg.sender, amount, token, recipient);\\n }\\n\\n /**\\n * @dev validates both tokens are valid addresses and unique\\n */\\n function _validateInputTokens(\\n Token token0,\\n Token token1\\n ) private pure validAddress(Token.unwrap(token0)) validAddress(Token.unwrap(token1)) {\\n if (token0 == token1) {\\n revert IdenticalAddresses();\\n }\\n }\\n\\n /**\\n * performs all necessary validations on the trade parameters\\n */\\n function _validateTradeParams(\\n Token sourceToken,\\n Token targetToken,\\n uint256 deadline,\\n uint256 value,\\n uint128 constraint\\n ) private view {\\n // revert if deadline has passed\\n if (deadline < block.timestamp) {\\n revert DeadlineExpired();\\n }\\n\\n // validate minReturn / maxInput\\n _greaterThanZero(constraint);\\n\\n // make sure source and target tokens are valid\\n _validateInputTokens(sourceToken, targetToken);\\n\\n // there shouldn't be any native token sent unless the source token is the native token\\n if (value > 0 && !sourceToken.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf08eeaf8950b3ff318470b8949e2b8251dea6962c8add54a2f94e48676dc832\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xf93c805727414083085098262481ac9def2bdeafcb71934234b0b92cc6320551\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 2000; // 0.2%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n\\n (bool safe, uint256 sum) = SafeMath.tryAdd(temp4, temp5);\\n if (safe) {\\n return MathEx.mulDivF(temp2, temp3 / factor, sum);\\n }\\n return temp2 / (A + MathEx.mulDivC(temp1, temp1, temp3));\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a93a6e20c3eaca8a03cb960bfe0e5da1b55216655c19ecb59b37a97aeb0a49d\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xf495e13cd389a72edea6e37db3ae5b419718eea5efc2cfb48259747c2399ff15\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\nusing Address for address payable;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance,\\n unsafeTransfer\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n * @dev forwards all available gas if sending native token\\n */\\nfunction unsafeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (isNative(token)) {\\n payable(to).sendValue(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x410b7ec2315aa0631a12c7d37f5ade829d4f1d326834cde1004ddab33ed5049e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/OnlyProxyDelegate.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev restrict delegation\\n */\\nabstract contract OnlyProxyDelegate {\\n address private immutable _proxy;\\n\\n error UnknownDelegator();\\n\\n constructor(address proxy) {\\n _proxy = proxy;\\n }\\n\\n modifier onlyProxyDelegate() {\\n _onlyProxyDelegate();\\n\\n _;\\n }\\n\\n function _onlyProxyDelegate() internal view {\\n if (address(this) != _proxy) {\\n revert UnknownDelegator();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x47a46b82fc8870eda785f8f0c7c9839a93c1503103d081d493e6ee42fefc3bb0\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200650638038062006506833981016040819052620000349162000893565b6001600160a01b0381166080526200004c826200006b565b6001600160a01b03821660a0526200006362000096565b505062000903565b6001600160a01b038116620000935760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000b75750600054600160ff909116105b80620000d35750303b158015620000d3575060005460ff166001145b6200013c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000160576000805461ff0019166101001790555b6200016a620001b3565b801562000093576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200020f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200021962000243565b62000223620002a9565b6200022d6200030f565b620002376200037f565b62000241620003e5565b565b600054610100900460ff166200029f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002416200047c565b600054610100900460ff16620003055760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620004d8565b600054610100900460ff166200036b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620003756200047c565b6200024162000541565b600054610100900460ff16620003db5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620005f8565b600054610100900460ff16620004415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002417f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16600080516020620064c68339815191526200065c565b600054610100900460ff16620002415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600054610100900460ff16620005345760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002416107d0620006a7565b600054610100900460ff166200059d5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620005ab60016006620008d2565b61012d805461ffff191661ffff92909216919091179055620005dd600080516020620064c6833981519152806200065c565b62000241600080516020620064c6833981519152336200072c565b600054610100900460ff16620006545760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600161015f55565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655463ffffffff600160801b90910481169082168103620006c7575050565b6065805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b6200073882826200073c565b5050565b62000748828262000767565b600082815260fb602052604090206200076290826200080b565b505050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166200073857600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620007c73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000822836001600160a01b0384166200082b565b90505b92915050565b6000818152600183016020526040812054620008745750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000825565b50600062000825565b6001600160a01b03811681146200009357600080fd5b60008060408385031215620008a757600080fd5b8251620008b4816200087d565b6020840151909250620008c7816200087d565b809150509250929050565b61ffff828116828216039080821115620008fc57634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a051615b7a6200094c600039600081816108b401528181610d2101528181610dcb01528181610f33015281816111a501526111ff015260006113580152615b7a6000f3fe6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6107d0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6107d0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "details": "Carbon Controller contract", - "events": { - "FeesWithdrawn(address,address,uint256,address)": { - "details": "triggered when fees are withdrawn" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PairCreated(uint128,address,address)": { - "details": "triggered when a new pair is created" - }, - "PairTradingFeePPMUpdated(address,address,uint32,uint32)": { - "details": "triggered when the custom trading fee for a given pair is updated" - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is created" - }, - "StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is deleted" - }, - "StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)": { - "details": "triggered when a strategy is updated" - }, - "TokensTraded(address,address,address,uint256,uint256,uint128,bool)": { - "details": "triggered when tokens are traded" - }, - "TradingFeePPMUpdated(uint32,uint32)": { - "details": "triggered when the network fee is updated" - } - }, - "kind": "dev", - "methods": { - "accumulatedFees(address)": { - "details": "returns the amount of fees accumulated for the specified token" - }, - "calculateTradeSourceAmount(address,address,(uint256,uint128)[])": { - "details": "returns the source amount required when trading by target amount" - }, - "calculateTradeTargetAmount(address,address,(uint256,uint128)[])": { - "details": "returns the target amount expected when trading by source amount" - }, - "constructor": { - "details": "used to set immutable state variables and initialize the implementation" - }, - "controllerType()": { - "details": "returns the type of the controller" - }, - "createPair(address,address)": { - "details": "creates a new pair of provided token0 and token1" - }, - "createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])": { - "details": "creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any" - }, - "deleteStrategy(uint256)": { - "details": "deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "pair(address,address)": { - "details": "returns a pair's metadata matching the provided token0 and token1" - }, - "pairTradingFeePPM(address,address)": { - "details": "returns the trading fee for a given pair (in units of PPM)" - }, - "pairs()": { - "details": "returns a list of all supported pairs" - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "roleFeesManager()": { - "details": "returns the fees manager role" - }, - "setPairTradingFeePPM(address,address,uint32)": { - "details": "sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "setTradingFeePPM(uint32)": { - "details": "sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "strategiesByPair(address,address,uint256,uint256)": { - "details": "returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex" - }, - "strategiesByPairCount(address,address)": { - "details": "returns the count of strategies belonging to a specific pair" - }, - "strategy(uint256)": { - "details": "returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradingFeePPM()": { - "details": "returns the trading fee (in units of PPM)" - }, - "updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])": { - "details": "updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any" - }, - "withdrawFees(address,uint256,address)": { - "details": "transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 13175, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_lastPairId", - "offset": 0, - "slot": "51", - "type": "t_uint128" - }, - { - "astId": 13183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairIds", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_userDefinedValueType(Token)19697,t_mapping(t_userDefinedValueType(Token)19697,t_uint128))" - }, - { - "astId": 13190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairsStorage", - "offset": 0, - "slot": "53", - "type": "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19697)2_storage)" - }, - { - "astId": 13196, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "54", - "type": "t_array(t_uint256)47_storage" - }, - { - "astId": 13666, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyCounter", - "offset": 0, - "slot": "101", - "type": "t_uint128" - }, - { - "astId": 13668, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_tradingFeePPM", - "offset": 16, - "slot": "101", - "type": "t_uint32" - }, - { - "astId": 13674, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_packedOrdersByStrategyId", - "offset": 0, - "slot": "102", - "type": "t_mapping(t_uint256,t_array(t_uint256)3_storage)" - }, - { - "astId": 13679, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyIdsByPairIdStorage", - "offset": 0, - "slot": "103", - "type": "t_mapping(t_uint128,t_struct(UintSet)4058_storage)" - }, - { - "astId": 13684, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_accumulatedFees", - "offset": 0, - "slot": "104", - "type": "t_mapping(t_userDefinedValueType(Token)19697,t_uint256)" - }, - { - "astId": 13688, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_customTradingFeePPM", - "offset": 0, - "slot": "105", - "type": "t_mapping(t_uint128,t_uint32)" - }, - { - "astId": 13694, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "106", - "type": "t_array(t_uint256)45_storage" - }, - { - "astId": 2591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "151", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roles", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roleMembers", - "offset": 0, - "slot": "251", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21185, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializations", - "offset": 0, - "slot": "301", - "type": "t_uint16" - }, - { - "astId": 21191, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "302", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 764, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_status", - "offset": 0, - "slot": "351", - "type": "t_uint256" - }, - { - "astId": 833, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "352", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12179, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_deprecated", - "offset": 0, - "slot": "401", - "type": "t_bool" - }, - { - "astId": 12183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__deprecated", - "offset": 0, - "slot": "402", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "451", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)3_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[3]", - "numberOfBytes": "96" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)47_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[47]", - "numberOfBytes": "1504" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_array(t_userDefinedValueType(Token)19697)2_storage": { - "base": "t_userDefinedValueType(Token)19697", - "encoding": "inplace", - "label": "Token[2]", - "numberOfBytes": "64" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19697)2_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => Token[2])", - "numberOfBytes": "32", - "value": "t_array(t_userDefinedValueType(Token)19697)2_storage" - }, - "t_mapping(t_uint128,t_struct(UintSet)4058_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => struct EnumerableSetUpgradeable.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)4058_storage" - }, - "t_mapping(t_uint128,t_uint32)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => uint32)", - "numberOfBytes": "32", - "value": "t_uint32" - }, - "t_mapping(t_uint256,t_array(t_uint256)3_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256[3])", - "numberOfBytes": "32", - "value": "t_array(t_uint256)3_storage" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_mapping(t_userDefinedValueType(Token)19697,t_uint128))": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => mapping(Token => uint128))", - "numberOfBytes": "32", - "value": "t_mapping(t_userDefinedValueType(Token)19697,t_uint128)" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_uint128)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => uint128)", - "numberOfBytes": "32", - "value": "t_uint128" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_uint256)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)4058_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.UintSet", - "members": [ - { - "astId": 4057, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_userDefinedValueType(Token)19697": { - "encoding": "inplace", - "label": "Token", - "numberOfBytes": "20" - } - } - } -} diff --git a/src/contracts/blast/CarbonController_Proxy.json b/src/contracts/blast/CarbonController_Proxy.json deleted file mode 100644 index b98c26e..0000000 --- a/src/contracts/blast/CarbonController_Proxy.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "address": "0xfBF49e30Ed1b610E24148c23D32eD5f3F2fC5Dba", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "transactionIndex": 0, - "gasUsed": "857050", - "logsBloom": "0x000040048200000008020000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000001000000000000000000000000000000000200004000000000001008000000008000000000200000000000000000000140000000000000000000000000000000000000a0000000000001800000000000000400000000000000000400000040000000000000001000000000000000000020000002000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279", - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000008ce318919438982514f9f479fdfb40d32c6ab749" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 1, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 6, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - } - ], - "blockNumber": 79146720, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": ["0x8cE318919438982514F9f479FDfB40D32C6ab749", "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", "0x8129fc1c"], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/src/contracts/blast/ProxyAdmin.json b/src/contracts/blast/ProxyAdmin.json deleted file mode 100644 index 1a7118f..0000000 --- a/src/contracts/blast/ProxyAdmin.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "address": "0x2478dD2394AD4B28D318Ec69Ee32acaa2b30A4b6", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "transactionIndex": 0, - "gasUsed": "483751", - "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000002000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x34f4736f3a37e3523733b0afb93e546c48be2a6ddc5d1754ce1dc102d3d9da71", - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146427, - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "address": "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x34f4736f3a37e3523733b0afb93e546c48be2a6ddc5d1754ce1dc102d3d9da71" - } - ], - "blockNumber": 79146427, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@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/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"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/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n *\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n */\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "devdoc": { - "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", - "kind": "dev", - "methods": { - "changeProxyAdmin(address,address)": { - "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." - }, - "getProxyAdmin(address)": { - "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "getProxyImplementation(address)": { - "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "upgrade(address,address)": { - "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." - }, - "upgradeAndCall(address,address,bytes)": { - "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 4735, - "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} diff --git a/src/contracts/blast/Voucher.json b/src/contracts/blast/Voucher.json deleted file mode 100644 index 13a8d4a..0000000 --- a/src/contracts/blast/Voucher.json +++ /dev/null @@ -1,1094 +0,0 @@ -{ - "address": "0xfA76DcA90d334C8fD3Ae479f9B4c32a31A37eDB1", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "transactionIndex": 0, - "gasUsed": "971164", - "logsBloom": "0x000000048208000008000000000000004800000000000000000000000000000000000000000000000000000000008000000000000040000000000000000000000000000000000000000008204000020000000000000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000000000080000400000000000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc", - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 4, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - } - ], - "blockNumber": 79146505, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "initialize", - "args": [true, "ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn", ""] - }, - "implementation": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/src/contracts/blast/Voucher_Implementation.json b/src/contracts/blast/Voucher_Implementation.json deleted file mode 100644 index 1ec3858..0000000 --- a/src/contracts/blast/Voucher_Implementation.json +++ /dev/null @@ -1,1454 +0,0 @@ -{ - "address": "0xA20E0b95B0596F0761B06e66e2F675f44d11AaB0", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "transactionIndex": 0, - "gasUsed": "3136060", - "logsBloom": "0x000000048200000008000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000000000000000000000000000000000000000001000200004000000000000008000000000000000000000000000000000000000100000000000000000000000000000000000000a0000000000000000000000000000000000000000000000400000000000000000000001000000000000000000000000000000000000000040000000000000000000100000000000020000000000000000080000000000000000000200000000000000000000000000000", - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12", - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "logs": [ - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - }, - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - }, - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - } - ], - "blockNumber": 79146440, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ControllerAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyController\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"BaseExtensionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"UseGlobalURIUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"setBaseExtension\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"controllerAddress\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"tokensByOwner\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"useGlobalURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseExtensionUpdated(string)\":{\"details\":\"triggered when updating the baseExtension\"},\"BaseURIUpdated(string)\":{\"details\":\"triggered when updating the baseURI\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"UseGlobalURIUpdated(bool)\":{\"details\":\"triggered when updating useGlobalURI\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"destroys the voucher token for the given strategyId requirements: - the caller must be the controller address\"},\"constructor\":{\"details\":\"used to initialize the implementation\"},\"controller()\":{\"details\":\"returns the controller address\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(bool,string,string)\":{\"details\":\"fully initializes the contract and its parents\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address,uint256)\":{\"details\":\"creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseExtension(string)\":{\"details\":\"sets the base extension requirements: - the caller must be the admin of this contract\"},\"setBaseURI(string)\":{\"details\":\"sets the base URI requirements: - the caller must be the admin of this contract\"},\"setController(address)\":{\"details\":\"sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens\"},\"tokensByOwner(address,uint256,uint256)\":{\"details\":\"returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"useGlobalURI(bool)\":{\"details\":\"sets the useGlobalURI flag requirements: - the caller must be the admin of this contract\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/voucher/Voucher.sol\":\"Voucher\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x121966b3220d263a6669dcf59c1254bd48ed237adf4d8a595add70a7927eada1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"./extensions/IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\\n using AddressUpgradeable for address;\\n using StringsUpgradeable 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 function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\\n return\\n interfaceId == type(IERC721Upgradeable).interfaceId ||\\n interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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(address from, address to, uint256 tokenId) 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(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) 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(address from, address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.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(address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721Upgradeable.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(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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(address owner, address operator, bool approved) 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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721ReceiverUpgradeable.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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0x09fa60c34ff9b067e5ad3af7719d490a12e0ca39132df6f870746eb0d32308ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.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 IERC721ReceiverUpgradeable {\\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\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.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 \\\"../IERC721Upgradeable.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 IERC721MetadataUpgradeable is IERC721Upgradeable {\\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\",\"keccak256\":\"0x95a471796eb5f030fdc438660bebec121ad5d063763e64d92376ffb4b5ce8b70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, 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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/Voucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport { IERC165Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\\\";\\nimport { ERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Utils, InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nimport { IVoucher } from \\\"./interfaces/IVoucher.sol\\\";\\n\\ncontract Voucher is IVoucher, Upgradeable, ERC721Upgradeable, Utils {\\n using Strings for uint256;\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n error BatchNotSupported();\\n\\n // a flag used to toggle between a unique URI per token / one global URI for all tokens\\n bool private _useGlobalURI;\\n\\n // the prefix of a dynamic URI representing a single token\\n string private __baseURI;\\n\\n // the suffix of a dynamic URI for e.g. `.json`\\n string private _baseExtension;\\n\\n // a mapping between an owner to its tokenIds\\n mapping(address => EnumerableSet.UintSet) internal _ownedTokens;\\n\\n // controller address - used to mint / burn\\n address private _controller;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n @dev triggered when updating useGlobalURI\\n */\\n event UseGlobalURIUpdated(bool newUseGlobalURI);\\n\\n /**\\n * @dev triggered when updating the baseURI\\n */\\n event BaseURIUpdated(string newBaseURI);\\n\\n /**\\n * @dev triggered when updating the baseExtension\\n */\\n event BaseExtensionUpdated(string newBaseExtension);\\n\\n /**\\n * @dev used to initialize the implementation\\n */\\n constructor() {\\n initialize(true, \\\"ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn\\\", \\\"\\\");\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) public initializer {\\n __Voucher_init(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Voucher_init(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n __Upgradeable_init();\\n __ERC721_init(\\\"Carbon Automated Trading Strategy\\\", \\\"CARBON-STRAT\\\");\\n\\n __Voucher_init_unchained(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Voucher_init_unchained(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n _useGlobalURI = newUseGlobalURI;\\n __baseURI = newBaseURI;\\n _baseExtension = newBaseExtension;\\n }\\n\\n /**\\n * @inheritdoc IERC165Upgradeable\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, IERC165Upgradeable) returns (bool) {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function controller() external view returns (address) {\\n return _controller;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function mint(address owner, uint256 tokenId) external onlyController {\\n _safeMint(owner, tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function burn(uint256 tokenId) external onlyController {\\n _burn(tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view validAddress(owner) returns (uint256[] memory) {\\n EnumerableSet.UintSet storage tokenIds = _ownedTokens[owner];\\n uint256 allLength = tokenIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last valid value\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n uint256[] memory result = new uint256[](resultLength);\\n for (uint256 i = 0; i < resultLength; i++) {\\n result[i] = tokenIds.at(startIndex + i);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher,\\n * or a URI of a global json used for all tokens\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n string memory baseURI = _baseURI();\\n if (_useGlobalURI) {\\n return baseURI;\\n }\\n\\n if (bytes(baseURI).length > 0) {\\n return string(abi.encodePacked(baseURI, tokenId.toString(), _baseExtension));\\n }\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev sets the base URI\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseURI(string memory newBaseURI) public onlyAdmin {\\n __baseURI = newBaseURI;\\n\\n emit BaseURIUpdated(newBaseURI);\\n }\\n\\n /**\\n * @dev sets the base extension\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseExtension(string memory newBaseExtension) public onlyAdmin {\\n _baseExtension = newBaseExtension;\\n\\n emit BaseExtensionUpdated(newBaseExtension);\\n }\\n\\n /**\\n * @dev sets the useGlobalURI flag\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function useGlobalURI(bool newUseGlobalURI) public onlyAdmin {\\n if (_useGlobalURI == newUseGlobalURI) {\\n return;\\n }\\n\\n _useGlobalURI = newUseGlobalURI;\\n emit UseGlobalURIUpdated(newUseGlobalURI);\\n }\\n\\n /**\\n * @dev sets the controller address\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n * - controller address must not be set\\n */\\n function setController(address controllerAddress) external onlyAdmin {\\n if (_controller != address(0)) {\\n revert ControllerAlreadySet();\\n }\\n _controller = controllerAddress;\\n }\\n\\n modifier onlyController() {\\n _onlyController();\\n _;\\n }\\n\\n function _onlyController() private view {\\n if (msg.sender != _controller) {\\n revert OnlyController();\\n }\\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`, `tokenId`\\n */\\n function _baseURI() internal view virtual override returns (string memory) {\\n return __baseURI;\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n revert BatchNotSupported();\\n }\\n\\n if (from == address(0)) {\\n _ownedTokens[to].add(firstTokenId);\\n } else if (from != to) {\\n _ownedTokens[from].remove(firstTokenId);\\n }\\n if (to == address(0)) {\\n _ownedTokens[from].remove(firstTokenId);\\n } else if (to != from) {\\n _ownedTokens[to].add(firstTokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc79748684fcebab62bedf5de477bf25fb41f7462a17e76cbef449222182c5f54\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5062000047600160405180606001604052806035815260200162003994603591396040805160208101909152600081526200004d565b62000851565b600054610100900460ff16158080156200006e5750600054600160ff909116105b806200008a5750303b1580156200008a575060005460ff166001145b620000f35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000117576000805461ff0019166101001790555b6200012484848462000171565b80156200016b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600054610100900460ff16620001cd5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b620001d762000230565b6200021e604051806060016040528060218152602001620039736021913960408051808201909152600c81526b10d0549093d38b54d514905560a21b6020820152620002a2565b6200022b8383836200030e565b505050565b600054610100900460ff166200028c5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200029662000398565b620002a0620003f4565b565b600054610100900460ff16620002fe5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200030a8282620004aa565b5050565b600054610100900460ff166200036a5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b61012d805460ff191684151517905561012e62000388838262000754565b5061012f6200016b828262000754565b600054610100900460ff16620002a05760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b600054610100900460ff16620004505760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200045e6001600262000820565b60c9805461ffff191661ffff929092169190911790556200048f600080516020620039c98339815191528062000523565b620002a0600080516020620039c9833981519152336200056e565b600054610100900460ff16620005065760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b60fb62000514838262000754565b5060fc6200022b828262000754565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200030a82826200058082826200059a565b60008281526097602052604090206200022b90826200063e565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166200030a5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005fa3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000655836001600160a01b0384166200065e565b90505b92915050565b6000818152600183016020526040812054620006a75750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000658565b50600062000658565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620006db57607f821691505b602082108103620006fc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022b57600081815260208120601f850160051c810160208610156200072b5750805b601f850160051c820191505b818110156200074c5782815560010162000737565b505050505050565b81516001600160401b03811115620007705762000770620006b0565b6200078881620007818454620006c6565b8462000702565b602080601f831160018114620007c05760008415620007a75750858301515b600019600386901b1c1916600185901b1785556200074c565b600085815260208120601f198616915b82811015620007f157888601518255948401946001909101908401620007d0565b5085821015620008105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff8281168282160390808211156200084a57634e487b7160e01b600052601160045260246000fd5b5092915050565b61311280620008616000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a436172626f6e204175746f6d617465642054726164696e67205374726174656779697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." - }, - "ApprovalForAll(address,address,bool)": { - "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." - }, - "BaseExtensionUpdated(string)": { - "details": "triggered when updating the baseExtension" - }, - "BaseURIUpdated(string)": { - "details": "triggered when updating the baseURI" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `tokenId` token is transferred from `from` to `to`." - }, - "UseGlobalURIUpdated(bool)": { - "details": "triggered when updating useGlobalURI" - } - }, - "kind": "dev", - "methods": { - "approve(address,uint256)": { - "details": "See {IERC721-approve}." - }, - "balanceOf(address)": { - "details": "See {IERC721-balanceOf}." - }, - "burn(uint256)": { - "details": "destroys the voucher token for the given strategyId requirements: - the caller must be the controller address" - }, - "constructor": { - "details": "used to initialize the implementation" - }, - "controller()": { - "details": "returns the controller address" - }, - "getApproved(uint256)": { - "details": "See {IERC721-getApproved}." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(bool,string,string)": { - "details": "fully initializes the contract and its parents" - }, - "isApprovedForAll(address,address)": { - "details": "See {IERC721-isApprovedForAll}." - }, - "mint(address,uint256)": { - "details": "creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address" - }, - "name()": { - "details": "See {IERC721Metadata-name}." - }, - "ownerOf(uint256)": { - "details": "See {IERC721-ownerOf}." - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "safeTransferFrom(address,address,uint256)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "safeTransferFrom(address,address,uint256,bytes)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "setApprovalForAll(address,bool)": { - "details": "See {IERC721-setApprovalForAll}." - }, - "setBaseExtension(string)": { - "details": "sets the base extension requirements: - the caller must be the admin of this contract" - }, - "setBaseURI(string)": { - "details": "sets the base URI requirements: - the caller must be the admin of this contract" - }, - "setController(address)": { - "details": "sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set" - }, - "supportsInterface(bytes4)": { - "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." - }, - "symbol()": { - "details": "See {IERC721Metadata-symbol}." - }, - "tokenURI(uint256)": { - "details": "depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens" - }, - "tokensByOwner(address,uint256,uint256)": { - "details": "returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex" - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC721-transferFrom}." - }, - "useGlobalURI(bool)": { - "details": "sets the useGlobalURI flag requirements: - the caller must be the admin of this contract" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21185, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 21191, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 863, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_name", - "offset": 0, - "slot": "251", - "type": "t_string_storage" - }, - { - "astId": 865, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_symbol", - "offset": 0, - "slot": "252", - "type": "t_string_storage" - }, - { - "astId": 869, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_owners", - "offset": 0, - "slot": "253", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 873, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_balances", - "offset": 0, - "slot": "254", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 877, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_tokenApprovals", - "offset": 0, - "slot": "255", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 883, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_operatorApprovals", - "offset": 0, - "slot": "256", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" - }, - { - "astId": 1785, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "257", - "type": "t_array(t_uint256)44_storage" - }, - { - "astId": 24088, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_useGlobalURI", - "offset": 0, - "slot": "301", - "type": "t_bool" - }, - { - "astId": 24090, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__baseURI", - "offset": 0, - "slot": "302", - "type": "t_string_storage" - }, - { - "astId": 24092, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_baseExtension", - "offset": 0, - "slot": "303", - "type": "t_string_storage" - }, - { - "astId": 24097, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_ownedTokens", - "offset": 0, - "slot": "304", - "type": "t_mapping(t_address,t_struct(UintSet)11994_storage)" - }, - { - "astId": 24099, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_controller", - "offset": 0, - "slot": "305", - "type": "t_address" - }, - { - "astId": 24105, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "306", - "type": "t_array(t_uint256)45_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)44_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_address,t_struct(UintSet)11994_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct EnumerableSet.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)11994_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)11522_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 11517, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 11521, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)11994_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.UintSet", - "members": [ - { - "astId": 11993, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)11522_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} diff --git a/src/contracts/blast/Voucher_Proxy.json b/src/contracts/blast/Voucher_Proxy.json deleted file mode 100644 index d634327..0000000 --- a/src/contracts/blast/Voucher_Proxy.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "address": "0xfA76DcA90d334C8fD3Ae479f9B4c32a31A37eDB1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "transactionIndex": 0, - "gasUsed": "971164", - "logsBloom": "0x000000048208000008000000000000004800000000000000000000000000000000000000000000000000000000008000000000000040000000000000000000000000000000000000000008204000020000000000000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000000000080000400000000000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc", - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 4, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - } - ], - "blockNumber": 79146505, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} diff --git a/src/contracts/celo/CarbonController.json b/src/contracts/celo/CarbonController.json deleted file mode 100644 index a96cf08..0000000 --- a/src/contracts/celo/CarbonController.json +++ /dev/null @@ -1,1865 +0,0 @@ -{ - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "transactionIndex": 0, - "gasUsed": "780190", - "logsBloom": "0x000000048200000008000000000000004804000000000000000001040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000000000000000000800000000000000000000200004000000000000008000000008000000000200000000000000000000340000000000000000000000000000000000000a0000000010000800000000000000400000000000000000400000040000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67", - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000bbaff3bf6ec4c15992c0fb37f12491fd62c5b496" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa0", - "logIndex": 1, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", - "logIndex": 6, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - } - ], - "blockNumber": 26828280, - "cumulativeGasUsed": "780190", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBBAFF3Bf6eC4C15992c0Fb37F12491Fd62C5B496", - "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "0x8129fc1c" - ], - "numDeployments": 2, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000db038038062000db0833981016040819052620000269162000403565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620004e3565b60008051602062000d698339815191521462000075576200007562000505565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620004e3565b60008051602062000d4983398151915214620000d357620000d362000505565b6001600160a01b038216608081905260008051602062000d498339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a1505050506200056e565b62000147836200016e565b600082511180620001555750805b156200016957620001678383620001b0565b505b505050565b6200017981620001e1565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001d8838360405180606001604052806027815260200162000d896027913962000284565b90505b92915050565b6001600160a01b0381163b620002545760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b60008051602062000d6983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b620002ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200024b565b600080856001600160a01b0316856040516200030b91906200051b565b600060405180830381855af49150503d806000811462000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b509092509050620003608282866200036c565b925050505b9392505050565b606083156200037d57508162000365565b8251156200038e5782518084602001fd5b8160405162461bcd60e51b81526004016200024b919062000539565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003fa578181015183820152602001620003e0565b50506000910152565b6000806000606084860312156200041957600080fd5b6200042484620003aa565b92506200043460208501620003aa565b60408501519092506001600160401b03808211156200045257600080fd5b818601915086601f8301126200046757600080fd5b8151818111156200047c576200047c620003c7565b604051601f8201601f19908116603f01168101908382118183101715620004a757620004a7620003c7565b81604052828152896020848701011115620004c157600080fd5b620004d4836020830160208801620003dd565b80955050505050509250925092565b81810381811115620001db57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516200052f818460208701620003dd565b9190910192915050565b60208152600082518060208401526200055a816040850160208701620003dd565b601f01601f19169190910160400192915050565b60805161079d620005ac6000396000818160ef01528181610145015281816101c701528181610211015281816102420152610266015261079d6000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000a", - "execute": { - "methodName": "postUpgrade", - "args": [ - "0x" - ] - }, - "implementation": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "events": { - "AdminChanged(address,address)": { - "details": "Emitted when the admin account has changed." - }, - "BeaconUpgraded(address)": { - "details": "Emitted when the beacon is upgraded." - }, - "Upgraded(address)": { - "details": "Emitted when the implementation is upgraded." - } - }, - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/celo/CarbonController_Implementation.json b/src/contracts/celo/CarbonController_Implementation.json deleted file mode 100644 index 9a16542..0000000 --- a/src/contracts/celo/CarbonController_Implementation.json +++ /dev/null @@ -1,2278 +0,0 @@ -{ - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IVoucher", - "name": "initVoucher", - "type": "address" - }, - { - "internalType": "address", - "name": "proxy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "transactionIndex": 1, - "gasUsed": "5361601", - "logsBloom": "0x000000048200000008000000000100000800000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000204000000000000000000000000000000000000000004000000200004000000000000008000000000000000000200000000000000000000140000000000000000000000000000000000000a0000000000000000000000000000400000000000000000400000040000000000000001000000000000000000000000000000000000000040000000000000000000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1", - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "logs": [ - { - "transactionIndex": 1, - "blockNumber": 26828283, - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa0", - "logIndex": 1, - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1" - }, - { - "transactionIndex": 1, - "blockNumber": 26828283, - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1" - }, - { - "transactionIndex": 1, - "blockNumber": 26828283, - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1" - }, - { - "transactionIndex": 1, - "blockNumber": 26828283, - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1" - }, - { - "transactionIndex": 1, - "blockNumber": 26828283, - "transactionHash": "0xe6e39cc2cbbe7ed6b3f68962055b74501ca4f9fb755f324b8114b10715f31b4f", - "address": "0x51aA24A9230e62CfaF259c47DE3133578cE36317", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x91abd60b81f2401a7187ddfccee157931d6877ee205f95d2af108bbc081412e1" - } - ], - "blockNumber": 26828283, - "cumulativeGasUsed": "5481756", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "0x6619871118D144c1c28eC3b23036FC1f0829ed3a" - ], - "numDeployments": 2, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVoucher\",\"name\":\"initVoucher\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BalanceMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientCapacity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionStrategyId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowerThanMinReturn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeAmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OrderDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutDated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnknownDelegator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"pairId\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"PairTradingFeePPMUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"reason\",\"type\":\"uint8\"}],\"name\":\"StrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"tradingFeeAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"byTargetAmount\",\"type\":\"bool\"}],\"name\":\"TokensTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"TradingFeePPMUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"accumulatedFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeSourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controllerType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"}],\"name\":\"deleteStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pairTradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairs\",\"outputs\":[{\"internalType\":\"Token[2][]\",\"name\":\"\",\"type\":\"address[2][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleFeesManager\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newPairTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setPairTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"strategiesByPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"strategiesByPairCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"strategy\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"minReturn\",\"type\":\"uint128\"}],\"name\":\"tradeBySourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"tradeByTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"currentOrders\",\"type\":\"tuple[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"newOrders\",\"type\":\"tuple[2]\"}],\"name\":\"updateStrategy\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Carbon Controller contract\",\"events\":{\"FeesWithdrawn(address,address,uint256,address)\":{\"details\":\"triggered when fees are withdrawn\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PairCreated(uint128,address,address)\":{\"details\":\"triggered when a new pair is created\"},\"PairTradingFeePPMUpdated(address,address,uint32,uint32)\":{\"details\":\"triggered when the custom trading fee for a given pair is updated\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is created\"},\"StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is deleted\"},\"StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)\":{\"details\":\"triggered when a strategy is updated\"},\"TokensTraded(address,address,address,uint256,uint256,uint128,bool)\":{\"details\":\"triggered when tokens are traded\"},\"TradingFeePPMUpdated(uint32,uint32)\":{\"details\":\"triggered when the network fee is updated\"}},\"kind\":\"dev\",\"methods\":{\"accumulatedFees(address)\":{\"details\":\"returns the amount of fees accumulated for the specified token\"},\"calculateTradeSourceAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the source amount required when trading by target amount\"},\"calculateTradeTargetAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the target amount expected when trading by source amount\"},\"constructor\":{\"details\":\"used to set immutable state variables and initialize the implementation\"},\"controllerType()\":{\"details\":\"returns the type of the controller\"},\"createPair(address,address)\":{\"details\":\"creates a new pair of provided token0 and token1\"},\"createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any\"},\"deleteStrategy(uint256)\":{\"details\":\"deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"pair(address,address)\":{\"details\":\"returns a pair's metadata matching the provided token0 and token1\"},\"pairTradingFeePPM(address,address)\":{\"details\":\"returns the trading fee for a given pair (in units of PPM)\"},\"pairs()\":{\"details\":\"returns a list of all supported pairs\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"roleFeesManager()\":{\"details\":\"returns the fees manager role\"},\"setPairTradingFeePPM(address,address,uint32)\":{\"details\":\"sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"setTradingFeePPM(uint32)\":{\"details\":\"sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"strategiesByPair(address,address,uint256,uint256)\":{\"details\":\"returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex\"},\"strategiesByPairCount(address,address)\":{\"details\":\"returns the count of strategies belonging to a specific pair\"},\"strategy(uint256)\":{\"details\":\"returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradingFeePPM()\":{\"details\":\"returns the trading fee (in units of PPM)\"},\"updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any\"},\"withdrawFees(address,uint256,address)\":{\"details\":\"transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/carbon/CarbonController.sol\":\"CarbonController\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"contracts/carbon/CarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Pairs, Pair } from \\\"./Pairs.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Strategies, Strategy, TradeAction, Order, TradeTokens } from \\\"./Strategies.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { ICarbonController } from \\\"./interfaces/ICarbonController.sol\\\";\\nimport { Utils, AccessDenied } from \\\"../utility/Utils.sol\\\";\\nimport { OnlyProxyDelegate } from \\\"../utility/OnlyProxyDelegate.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev Carbon Controller contract\\n */\\ncontract CarbonController is\\n ICarbonController,\\n Pairs,\\n Strategies,\\n Upgradeable,\\n ReentrancyGuardUpgradeable,\\n OnlyProxyDelegate,\\n Utils\\n{\\n // the fees manager role is required to withdraw fees\\n bytes32 private constant ROLE_FEES_MANAGER = keccak256(\\\"ROLE_FEES_MANAGER\\\");\\n\\n uint16 private constant CONTROLLER_TYPE = 1;\\n\\n // deprecated parent storage vars\\n bool private _deprecated;\\n uint256[49] private __deprecated;\\n\\n // the voucher contract\\n IVoucher private immutable _voucher;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP] private __gap;\\n\\n error IdenticalAddresses();\\n error UnnecessaryNativeTokenReceived();\\n error InsufficientNativeTokenReceived();\\n error DeadlineExpired();\\n\\n /**\\n * @dev used to set immutable state variables and initialize the implementation\\n */\\n constructor(IVoucher initVoucher, address proxy) OnlyProxyDelegate(proxy) {\\n _validAddress(address(initVoucher));\\n\\n _voucher = initVoucher;\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonController_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonController_init() internal onlyInitializing {\\n __Pairs_init();\\n __Strategies_init();\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonController_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonController_init_unchained() internal onlyInitializing {\\n // set up administrative roles\\n _setRoleAdmin(ROLE_FEES_MANAGER, ROLE_ADMIN);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure virtual override(IVersioned, Upgradeable) returns (uint16) {\\n return 6;\\n }\\n\\n /**\\n * @dev returns the fees manager role\\n */\\n function roleFeesManager() external pure returns (bytes32) {\\n return ROLE_FEES_MANAGER;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function controllerType() external pure virtual returns (uint16) {\\n return CONTROLLER_TYPE;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradingFeePPM() external view returns (uint32) {\\n return _tradingFeePPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32) {\\n Pair memory _pair = _pair(token0, token1);\\n return _getPairTradingFeePPM(_pair.id);\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTradingFeePPM(uint32 newTradingFeePPM) external onlyAdmin validFee(newTradingFeePPM) {\\n _setTradingFeePPM(newTradingFeePPM);\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPairTradingFeePPM(\\n Token token0,\\n Token token1,\\n uint32 newPairTradingFeePPM\\n ) external onlyAdmin validFee(newPairTradingFeePPM) {\\n Pair memory _pair = _pair(token0, token1);\\n _setPairTradingFeePPM(_pair, newPairTradingFeePPM);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createPair(Token token0, Token token1) external nonReentrant onlyProxyDelegate returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _createPair(token0, token1);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairs() external view returns (Token[2][] memory) {\\n return _pairs();\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _pair(token0, token1);\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createStrategy(\\n Token token0,\\n Token token1,\\n Order[2] calldata orders\\n ) external payable nonReentrant onlyProxyDelegate returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !token0.isNative() && !token1.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(orders);\\n\\n // create the pair if it does not exist\\n Pair memory strategyPair;\\n if (!_pairExists(token0, token1)) {\\n strategyPair = _createPair(token0, token1);\\n } else {\\n strategyPair = _pair(token0, token1);\\n }\\n\\n Token[2] memory tokens = [token0, token1];\\n return _createStrategy(_voucher, tokens, orders, strategyPair, msg.sender, msg.value);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable nonReentrant onlyProxyDelegate {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !strategyPair.tokens[0].isNative() && !strategyPair.tokens[1].isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(newOrders);\\n\\n // perform update\\n _updateStrategy(strategyId, currentOrders, newOrders, strategyPair, msg.sender, msg.value);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function deleteStrategy(uint256 strategyId) external nonReentrant onlyProxyDelegate {\\n // find strategy, reverts if none\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // delete strategy\\n _deleteStrategy(strategyId, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategy(uint256 id) external view returns (Strategy memory) {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(id));\\n return _strategy(id, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPair(strategyPair, startIndex, endIndex, _voucher);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPairCount(strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, minReturn);\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: false,\\n constraint: minReturn,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, maxInput);\\n\\n if (sourceToken.isNative()) {\\n // tx's value should at least match the maxInput\\n if (msg.value < maxInput) {\\n revert InsufficientNativeTokenReceived();\\n }\\n }\\n\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: true,\\n constraint: maxInput,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, true);\\n return amounts.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, false);\\n return amounts.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function accumulatedFees(Token token) external view validAddress(Token.unwrap(token)) returns (uint256) {\\n return _accumulatedFees[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function withdrawFees(\\n Token token,\\n uint256 amount,\\n address recipient\\n )\\n external\\n onlyRoleMember(ROLE_FEES_MANAGER)\\n validAddress(recipient)\\n validAddress(Token.unwrap(token))\\n greaterThanZero(amount)\\n nonReentrant\\n returns (uint256)\\n {\\n return _withdrawFees(msg.sender, amount, token, recipient);\\n }\\n\\n /**\\n * @dev validates both tokens are valid addresses and unique\\n */\\n function _validateInputTokens(\\n Token token0,\\n Token token1\\n ) private pure validAddress(Token.unwrap(token0)) validAddress(Token.unwrap(token1)) {\\n if (token0 == token1) {\\n revert IdenticalAddresses();\\n }\\n }\\n\\n /**\\n * performs all necessary validations on the trade parameters\\n */\\n function _validateTradeParams(\\n Token sourceToken,\\n Token targetToken,\\n uint256 deadline,\\n uint256 value,\\n uint128 constraint\\n ) private view {\\n // revert if deadline has passed\\n if (deadline < block.timestamp) {\\n revert DeadlineExpired();\\n }\\n\\n // validate minReturn / maxInput\\n _greaterThanZero(constraint);\\n\\n // make sure source and target tokens are valid\\n _validateInputTokens(sourceToken, targetToken);\\n\\n // there shouldn't be any native token sent unless the source token is the native token\\n if (value > 0 && !sourceToken.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf08eeaf8950b3ff318470b8949e2b8251dea6962c8add54a2f94e48676dc832\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xf93c805727414083085098262481ac9def2bdeafcb71934234b0b92cc6320551\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 4000; // 0.4%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n\\n (bool safe, uint256 sum) = SafeMath.tryAdd(temp4, temp5);\\n if (safe) {\\n return MathEx.mulDivF(temp2, temp3 / factor, sum);\\n }\\n return temp2 / (A + MathEx.mulDivC(temp1, temp1, temp3));\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xddfe729cc073256f10ce38329e8155108692bafa508326f959ff06e049849f44\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xf495e13cd389a72edea6e37db3ae5b419718eea5efc2cfb48259747c2399ff15\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\nusing Address for address payable;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance,\\n unsafeTransfer\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n * @dev forwards all available gas if sending native token\\n */\\nfunction unsafeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (isNative(token)) {\\n payable(to).sendValue(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x410b7ec2315aa0631a12c7d37f5ade829d4f1d326834cde1004ddab33ed5049e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/OnlyProxyDelegate.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev restrict delegation\\n */\\nabstract contract OnlyProxyDelegate {\\n address private immutable _proxy;\\n\\n error UnknownDelegator();\\n\\n constructor(address proxy) {\\n _proxy = proxy;\\n }\\n\\n modifier onlyProxyDelegate() {\\n _onlyProxyDelegate();\\n\\n _;\\n }\\n\\n function _onlyProxyDelegate() internal view {\\n if (address(this) != _proxy) {\\n revert UnknownDelegator();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x47a46b82fc8870eda785f8f0c7c9839a93c1503103d081d493e6ee42fefc3bb0\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200650638038062006506833981016040819052620000349162000893565b6001600160a01b0381166080526200004c826200006b565b6001600160a01b03821660a0526200006362000096565b505062000903565b6001600160a01b038116620000935760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000b75750600054600160ff909116105b80620000d35750303b158015620000d3575060005460ff166001145b6200013c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000160576000805461ff0019166101001790555b6200016a620001b3565b801562000093576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200020f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200021962000243565b62000223620002a9565b6200022d6200030f565b620002376200037f565b62000241620003e5565b565b600054610100900460ff166200029f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002416200047c565b600054610100900460ff16620003055760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620004d8565b600054610100900460ff166200036b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620003756200047c565b6200024162000541565b600054610100900460ff16620003db5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620005f8565b600054610100900460ff16620004415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002417f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16600080516020620064c68339815191526200065c565b600054610100900460ff16620002415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600054610100900460ff16620005345760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241610fa0620006a7565b600054610100900460ff166200059d5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620005ab60016006620008d2565b61012d805461ffff191661ffff92909216919091179055620005dd600080516020620064c6833981519152806200065c565b62000241600080516020620064c6833981519152336200072c565b600054610100900460ff16620006545760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600161015f55565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655463ffffffff600160801b90910481169082168103620006c7575050565b6065805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b6200073882826200073c565b5050565b62000748828262000767565b600082815260fb602052604090206200076290826200080b565b505050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166200073857600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620007c73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000822836001600160a01b0384166200082b565b90505b92915050565b6000818152600183016020526040812054620008745750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000825565b50600062000825565b6001600160a01b03811681146200009357600080fd5b60008060408385031215620008a757600080fd5b8251620008b4816200087d565b6020840151909250620008c7816200087d565b809150509250929050565b61ffff828116828216039080821115620008fc57634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a051615b7a6200094c600039600081816108b401528181610d2101528181610dcb01528181610f33015281816111a501526111ff015260006113580152615b7a6000f3fe6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af610fa0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af610fa0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "details": "Carbon Controller contract", - "events": { - "FeesWithdrawn(address,address,uint256,address)": { - "details": "triggered when fees are withdrawn" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PairCreated(uint128,address,address)": { - "details": "triggered when a new pair is created" - }, - "PairTradingFeePPMUpdated(address,address,uint32,uint32)": { - "details": "triggered when the custom trading fee for a given pair is updated" - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is created" - }, - "StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is deleted" - }, - "StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)": { - "details": "triggered when a strategy is updated" - }, - "TokensTraded(address,address,address,uint256,uint256,uint128,bool)": { - "details": "triggered when tokens are traded" - }, - "TradingFeePPMUpdated(uint32,uint32)": { - "details": "triggered when the network fee is updated" - } - }, - "kind": "dev", - "methods": { - "accumulatedFees(address)": { - "details": "returns the amount of fees accumulated for the specified token" - }, - "calculateTradeSourceAmount(address,address,(uint256,uint128)[])": { - "details": "returns the source amount required when trading by target amount" - }, - "calculateTradeTargetAmount(address,address,(uint256,uint128)[])": { - "details": "returns the target amount expected when trading by source amount" - }, - "constructor": { - "details": "used to set immutable state variables and initialize the implementation" - }, - "controllerType()": { - "details": "returns the type of the controller" - }, - "createPair(address,address)": { - "details": "creates a new pair of provided token0 and token1" - }, - "createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])": { - "details": "creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any" - }, - "deleteStrategy(uint256)": { - "details": "deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "pair(address,address)": { - "details": "returns a pair's metadata matching the provided token0 and token1" - }, - "pairTradingFeePPM(address,address)": { - "details": "returns the trading fee for a given pair (in units of PPM)" - }, - "pairs()": { - "details": "returns a list of all supported pairs" - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "roleFeesManager()": { - "details": "returns the fees manager role" - }, - "setPairTradingFeePPM(address,address,uint32)": { - "details": "sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "setTradingFeePPM(uint32)": { - "details": "sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "strategiesByPair(address,address,uint256,uint256)": { - "details": "returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex" - }, - "strategiesByPairCount(address,address)": { - "details": "returns the count of strategies belonging to a specific pair" - }, - "strategy(uint256)": { - "details": "returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradingFeePPM()": { - "details": "returns the trading fee (in units of PPM)" - }, - "updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])": { - "details": "updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any" - }, - "withdrawFees(address,uint256,address)": { - "details": "transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 13175, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_lastPairId", - "offset": 0, - "slot": "51", - "type": "t_uint128" - }, - { - "astId": 13183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairIds", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_userDefinedValueType(Token)19710,t_mapping(t_userDefinedValueType(Token)19710,t_uint128))" - }, - { - "astId": 13190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairsStorage", - "offset": 0, - "slot": "53", - "type": "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19710)2_storage)" - }, - { - "astId": 13196, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "54", - "type": "t_array(t_uint256)47_storage" - }, - { - "astId": 13666, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyCounter", - "offset": 0, - "slot": "101", - "type": "t_uint128" - }, - { - "astId": 13668, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_tradingFeePPM", - "offset": 16, - "slot": "101", - "type": "t_uint32" - }, - { - "astId": 13674, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_packedOrdersByStrategyId", - "offset": 0, - "slot": "102", - "type": "t_mapping(t_uint256,t_array(t_uint256)3_storage)" - }, - { - "astId": 13679, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyIdsByPairIdStorage", - "offset": 0, - "slot": "103", - "type": "t_mapping(t_uint128,t_struct(UintSet)4058_storage)" - }, - { - "astId": 13684, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_accumulatedFees", - "offset": 0, - "slot": "104", - "type": "t_mapping(t_userDefinedValueType(Token)19710,t_uint256)" - }, - { - "astId": 13688, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_customTradingFeePPM", - "offset": 0, - "slot": "105", - "type": "t_mapping(t_uint128,t_uint32)" - }, - { - "astId": 13694, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "106", - "type": "t_array(t_uint256)45_storage" - }, - { - "astId": 2591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "151", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roles", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roleMembers", - "offset": 0, - "slot": "251", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21198, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializations", - "offset": 0, - "slot": "301", - "type": "t_uint16" - }, - { - "astId": 21204, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "302", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 764, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_status", - "offset": 0, - "slot": "351", - "type": "t_uint256" - }, - { - "astId": 833, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "352", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12179, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_deprecated", - "offset": 0, - "slot": "401", - "type": "t_bool" - }, - { - "astId": 12183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__deprecated", - "offset": 0, - "slot": "402", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "451", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)3_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[3]", - "numberOfBytes": "96" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)47_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[47]", - "numberOfBytes": "1504" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_array(t_userDefinedValueType(Token)19710)2_storage": { - "base": "t_userDefinedValueType(Token)19710", - "encoding": "inplace", - "label": "Token[2]", - "numberOfBytes": "64" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19710)2_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => Token[2])", - "numberOfBytes": "32", - "value": "t_array(t_userDefinedValueType(Token)19710)2_storage" - }, - "t_mapping(t_uint128,t_struct(UintSet)4058_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => struct EnumerableSetUpgradeable.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)4058_storage" - }, - "t_mapping(t_uint128,t_uint32)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => uint32)", - "numberOfBytes": "32", - "value": "t_uint32" - }, - "t_mapping(t_uint256,t_array(t_uint256)3_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256[3])", - "numberOfBytes": "32", - "value": "t_array(t_uint256)3_storage" - }, - "t_mapping(t_userDefinedValueType(Token)19710,t_mapping(t_userDefinedValueType(Token)19710,t_uint128))": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19710", - "label": "mapping(Token => mapping(Token => uint128))", - "numberOfBytes": "32", - "value": "t_mapping(t_userDefinedValueType(Token)19710,t_uint128)" - }, - "t_mapping(t_userDefinedValueType(Token)19710,t_uint128)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19710", - "label": "mapping(Token => uint128)", - "numberOfBytes": "32", - "value": "t_uint128" - }, - "t_mapping(t_userDefinedValueType(Token)19710,t_uint256)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19710", - "label": "mapping(Token => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)4058_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.UintSet", - "members": [ - { - "astId": 4057, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_userDefinedValueType(Token)19710": { - "encoding": "inplace", - "label": "Token", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/celo/CarbonController_Proxy.json b/src/contracts/celo/CarbonController_Proxy.json deleted file mode 100644 index 87de2a8..0000000 --- a/src/contracts/celo/CarbonController_Proxy.json +++ /dev/null @@ -1,299 +0,0 @@ -{ - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "transactionIndex": 0, - "gasUsed": "780190", - "logsBloom": "0x000000048200000008000000000000004804000000000000000001040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000000000000000000800000000000000000000200004000000000000008000000008000000000200000000000000000000340000000000000000000000000000000000000a0000000010000800000000000000400000000000000000400000040000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67", - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000bbaff3bf6ec4c15992c0fb37f12491fd62c5b496" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa0", - "logIndex": 1, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - }, - { - "transactionIndex": 0, - "blockNumber": 26828280, - "transactionHash": "0xc43b393131568de6109ba5b3a8d7a51b7a3b0602fa5e72d9405d8bcc3407f7cf", - "address": "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", - "logIndex": 6, - "blockHash": "0xf947967e13832998dc41e6df6f66ea4ccf52a64ed938cb396989742c4f5a9e67" - } - ], - "blockNumber": 26828280, - "cumulativeGasUsed": "780190", - "status": 1, - "byzantium": true - }, - "args": [ - "0xBBAFF3Bf6eC4C15992c0Fb37F12491Fd62C5B496", - "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "0x8129fc1c" - ], - "numDeployments": 1, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000db038038062000db0833981016040819052620000269162000403565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620004e3565b60008051602062000d698339815191521462000075576200007562000505565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620004e3565b60008051602062000d4983398151915214620000d357620000d362000505565b6001600160a01b038216608081905260008051602062000d498339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a1505050506200056e565b62000147836200016e565b600082511180620001555750805b156200016957620001678383620001b0565b505b505050565b6200017981620001e1565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001d8838360405180606001604052806027815260200162000d896027913962000284565b90505b92915050565b6001600160a01b0381163b620002545760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b60008051602062000d6983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b620002ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200024b565b600080856001600160a01b0316856040516200030b91906200051b565b600060405180830381855af49150503d806000811462000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b509092509050620003608282866200036c565b925050505b9392505050565b606083156200037d57508162000365565b8251156200038e5782518084602001fd5b8160405162461bcd60e51b81526004016200024b919062000539565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003fa578181015183820152602001620003e0565b50506000910152565b6000806000606084860312156200041957600080fd5b6200042484620003aa565b92506200043460208501620003aa565b60408501519092506001600160401b03808211156200045257600080fd5b818601915086601f8301126200046757600080fd5b8151818111156200047c576200047c620003c7565b604051601f8201601f19908116603f01168101908382118183101715620004a757620004a7620003c7565b81604052828152896020848701011115620004c157600080fd5b620004d4836020830160208801620003dd565b80955050505050509250925092565b81810381811115620001db57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516200052f818460208701620003dd565b9190910192915050565b60208152600082518060208401526200055a816040850160208701620003dd565b601f01601f19169190910160400192915050565b60805161079d620005ac6000396000818160ef01528181610145015281816101c701528181610211015281816102420152610266015261079d6000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000a", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "events": { - "AdminChanged(address,address)": { - "details": "Emitted when the admin account has changed." - }, - "BeaconUpgraded(address)": { - "details": "Emitted when the beacon is upgraded." - }, - "Upgraded(address)": { - "details": "Emitted when the implementation is upgraded." - } - }, - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/celo/ProxyAdmin.json b/src/contracts/celo/ProxyAdmin.json deleted file mode 100644 index c821c1e..0000000 --- a/src/contracts/celo/ProxyAdmin.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x1a3b2ec4b1d479097da1cfa6468810840b2e23eea5d80eeb3587c8ce6fbb7065", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "transactionIndex": 2, - "gasUsed": "483623", - "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000002020000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000040000000000000000000000000000000000000000000000000000000", - "blockHash": "0x43814550697e7ad831049253c48b21d1651f6fbef36390ebaabaee41ad5b68f0", - "transactionHash": "0x1a3b2ec4b1d479097da1cfa6468810840b2e23eea5d80eeb3587c8ce6fbb7065", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 26828271, - "transactionHash": "0x1a3b2ec4b1d479097da1cfa6468810840b2e23eea5d80eeb3587c8ce6fbb7065", - "address": "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 7, - "blockHash": "0x43814550697e7ad831049253c48b21d1651f6fbef36390ebaabaee41ad5b68f0" - } - ], - "blockNumber": 26828271, - "cumulativeGasUsed": "787334", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@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/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"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/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n *\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n */\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "devdoc": { - "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", - "kind": "dev", - "methods": { - "changeProxyAdmin(address,address)": { - "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." - }, - "getProxyAdmin(address)": { - "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "getProxyImplementation(address)": { - "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "upgrade(address,address)": { - "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." - }, - "upgradeAndCall(address,address,bytes)": { - "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 4735, - "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/celo/Voucher.json b/src/contracts/celo/Voucher.json deleted file mode 100644 index 1290c6c..0000000 --- a/src/contracts/celo/Voucher.json +++ /dev/null @@ -1,1113 +0,0 @@ -{ - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "transactionIndex": 4, - "gasUsed": "894290", - "logsBloom": "0x000000048200000008000000000000004800000000000000000000000001000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000204000020000000040000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000001000000000000000100000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804", - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000005bca3389786385a35bca14c2d0582adc6cb2482e" - ], - "data": "0x", - "logIndex": 14, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 15, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 16, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 17, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", - "logIndex": 18, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - } - ], - "blockNumber": 26828276, - "cumulativeGasUsed": "1444150", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000db038038062000db0833981016040819052620000269162000403565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620004e3565b60008051602062000d698339815191521462000075576200007562000505565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620004e3565b60008051602062000d4983398151915214620000d357620000d362000505565b6001600160a01b038216608081905260008051602062000d498339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a1505050506200056e565b62000147836200016e565b600082511180620001555750805b156200016957620001678383620001b0565b505b505050565b6200017981620001e1565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001d8838360405180606001604052806027815260200162000d896027913962000284565b90505b92915050565b6001600160a01b0381163b620002545760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b60008051602062000d6983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b620002ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200024b565b600080856001600160a01b0316856040516200030b91906200051b565b600060405180830381855af49150503d806000811462000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b509092509050620003608282866200036c565b925050505b9392505050565b606083156200037d57508162000365565b8251156200038e5782518084602001fd5b8160405162461bcd60e51b81526004016200024b919062000539565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003fa578181015183820152602001620003e0565b50506000910152565b6000806000606084860312156200041957600080fd5b6200042484620003aa565b92506200043460208501620003aa565b60408501519092506001600160401b03808211156200045257600080fd5b818601915086601f8301126200046757600080fd5b8151818111156200047c576200047c620003c7565b604051601f8201601f19908116603f01168101908382118183101715620004a757620004a7620003c7565b81604052828152896020848701011115620004c157600080fd5b620004d4836020830160208801620003dd565b80955050505050509250925092565b81810381811115620001db57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516200052f818460208701620003dd565b9190910192915050565b60208152600082518060208401526200055a816040850160208701620003dd565b601f01601f19169190910160400192915050565b60805161079d620005ac6000396000818160ef01528181610145015281816101c701528181610211015281816102420152610266015261079d6000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000a", - "execute": { - "methodName": "initialize", - "args": [ - true, - "ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn", - "" - ] - }, - "implementation": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "events": { - "AdminChanged(address,address)": { - "details": "Emitted when the admin account has changed." - }, - "BeaconUpgraded(address)": { - "details": "Emitted when the beacon is upgraded." - }, - "Upgraded(address)": { - "details": "Emitted when the implementation is upgraded." - } - }, - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/celo/Voucher_Implementation.json b/src/contracts/celo/Voucher_Implementation.json deleted file mode 100644 index dea8399..0000000 --- a/src/contracts/celo/Voucher_Implementation.json +++ /dev/null @@ -1,1456 +0,0 @@ -{ - "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0x75fe16240224ffce6bd0bf4aa042cfff2093c566ebcd887e7f32a44e92bacb6d", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "transactionIndex": 36, - "gasUsed": "3135130", - "logsBloom": "0x000000048200000008000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000000000000000000000000000000000000000008000200004000000000000008000000000000000000000000800000000000000100000000000000000000002000000000000000a0000000000000000000000000000000000000000000000400000000000000000000001000000000000000000000000000000000000000040000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x647b4b90abeb961a7376013ecbb681bc8f1a0faede07d240a0531b6269bd609a", - "transactionHash": "0x75fe16240224ffce6bd0bf4aa042cfff2093c566ebcd887e7f32a44e92bacb6d", - "logs": [ - { - "transactionIndex": 36, - "blockNumber": 26828274, - "transactionHash": "0x75fe16240224ffce6bd0bf4aa042cfff2093c566ebcd887e7f32a44e92bacb6d", - "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 51, - "blockHash": "0x647b4b90abeb961a7376013ecbb681bc8f1a0faede07d240a0531b6269bd609a" - }, - { - "transactionIndex": 36, - "blockNumber": 26828274, - "transactionHash": "0x75fe16240224ffce6bd0bf4aa042cfff2093c566ebcd887e7f32a44e92bacb6d", - "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 52, - "blockHash": "0x647b4b90abeb961a7376013ecbb681bc8f1a0faede07d240a0531b6269bd609a" - }, - { - "transactionIndex": 36, - "blockNumber": 26828274, - "transactionHash": "0x75fe16240224ffce6bd0bf4aa042cfff2093c566ebcd887e7f32a44e92bacb6d", - "address": "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 53, - "blockHash": "0x647b4b90abeb961a7376013ecbb681bc8f1a0faede07d240a0531b6269bd609a" - } - ], - "blockNumber": 26828274, - "cumulativeGasUsed": "11881828", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ControllerAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyController\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"BaseExtensionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"UseGlobalURIUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"setBaseExtension\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"controllerAddress\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"tokensByOwner\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"useGlobalURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseExtensionUpdated(string)\":{\"details\":\"triggered when updating the baseExtension\"},\"BaseURIUpdated(string)\":{\"details\":\"triggered when updating the baseURI\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"UseGlobalURIUpdated(bool)\":{\"details\":\"triggered when updating useGlobalURI\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"destroys the voucher token for the given strategyId requirements: - the caller must be the controller address\"},\"constructor\":{\"details\":\"used to initialize the implementation\"},\"controller()\":{\"details\":\"returns the controller address\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(bool,string,string)\":{\"details\":\"fully initializes the contract and its parents\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address,uint256)\":{\"details\":\"creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseExtension(string)\":{\"details\":\"sets the base extension requirements: - the caller must be the admin of this contract\"},\"setBaseURI(string)\":{\"details\":\"sets the base URI requirements: - the caller must be the admin of this contract\"},\"setController(address)\":{\"details\":\"sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens\"},\"tokensByOwner(address,uint256,uint256)\":{\"details\":\"returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"useGlobalURI(bool)\":{\"details\":\"sets the useGlobalURI flag requirements: - the caller must be the admin of this contract\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/voucher/Voucher.sol\":\"Voucher\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x121966b3220d263a6669dcf59c1254bd48ed237adf4d8a595add70a7927eada1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"./extensions/IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\\n using AddressUpgradeable for address;\\n using StringsUpgradeable 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 function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\\n return\\n interfaceId == type(IERC721Upgradeable).interfaceId ||\\n interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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(address from, address to, uint256 tokenId) 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(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) 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(address from, address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.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(address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721Upgradeable.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(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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(address owner, address operator, bool approved) 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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721ReceiverUpgradeable.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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0x09fa60c34ff9b067e5ad3af7719d490a12e0ca39132df6f870746eb0d32308ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.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 IERC721ReceiverUpgradeable {\\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\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.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 \\\"../IERC721Upgradeable.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 IERC721MetadataUpgradeable is IERC721Upgradeable {\\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\",\"keccak256\":\"0x95a471796eb5f030fdc438660bebec121ad5d063763e64d92376ffb4b5ce8b70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, 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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/Voucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport { IERC165Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\\\";\\nimport { ERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Utils, InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nimport { IVoucher } from \\\"./interfaces/IVoucher.sol\\\";\\n\\ncontract Voucher is IVoucher, Upgradeable, ERC721Upgradeable, Utils {\\n using Strings for uint256;\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n error BatchNotSupported();\\n\\n // a flag used to toggle between a unique URI per token / one global URI for all tokens\\n bool private _useGlobalURI;\\n\\n // the prefix of a dynamic URI representing a single token\\n string private __baseURI;\\n\\n // the suffix of a dynamic URI for e.g. `.json`\\n string private _baseExtension;\\n\\n // a mapping between an owner to its tokenIds\\n mapping(address => EnumerableSet.UintSet) internal _ownedTokens;\\n\\n // controller address - used to mint / burn\\n address private _controller;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n @dev triggered when updating useGlobalURI\\n */\\n event UseGlobalURIUpdated(bool newUseGlobalURI);\\n\\n /**\\n * @dev triggered when updating the baseURI\\n */\\n event BaseURIUpdated(string newBaseURI);\\n\\n /**\\n * @dev triggered when updating the baseExtension\\n */\\n event BaseExtensionUpdated(string newBaseExtension);\\n\\n /**\\n * @dev used to initialize the implementation\\n */\\n constructor() {\\n initialize(true, \\\"ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn\\\", \\\"\\\");\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) public initializer {\\n __Voucher_init(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Voucher_init(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n __Upgradeable_init();\\n __ERC721_init(\\\"Carbon Automated Trading Strategy\\\", \\\"CARBON-STRAT\\\");\\n\\n __Voucher_init_unchained(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Voucher_init_unchained(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n _useGlobalURI = newUseGlobalURI;\\n __baseURI = newBaseURI;\\n _baseExtension = newBaseExtension;\\n }\\n\\n /**\\n * @inheritdoc IERC165Upgradeable\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, IERC165Upgradeable) returns (bool) {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function controller() external view returns (address) {\\n return _controller;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function mint(address owner, uint256 tokenId) external onlyController {\\n _safeMint(owner, tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function burn(uint256 tokenId) external onlyController {\\n _burn(tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view validAddress(owner) returns (uint256[] memory) {\\n EnumerableSet.UintSet storage tokenIds = _ownedTokens[owner];\\n uint256 allLength = tokenIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last valid value\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n uint256[] memory result = new uint256[](resultLength);\\n for (uint256 i = 0; i < resultLength; i++) {\\n result[i] = tokenIds.at(startIndex + i);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher,\\n * or a URI of a global json used for all tokens\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n string memory baseURI = _baseURI();\\n if (_useGlobalURI) {\\n return baseURI;\\n }\\n\\n if (bytes(baseURI).length > 0) {\\n return string(abi.encodePacked(baseURI, tokenId.toString(), _baseExtension));\\n }\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev sets the base URI\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseURI(string memory newBaseURI) public onlyAdmin {\\n __baseURI = newBaseURI;\\n\\n emit BaseURIUpdated(newBaseURI);\\n }\\n\\n /**\\n * @dev sets the base extension\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseExtension(string memory newBaseExtension) public onlyAdmin {\\n _baseExtension = newBaseExtension;\\n\\n emit BaseExtensionUpdated(newBaseExtension);\\n }\\n\\n /**\\n * @dev sets the useGlobalURI flag\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function useGlobalURI(bool newUseGlobalURI) public onlyAdmin {\\n if (_useGlobalURI == newUseGlobalURI) {\\n return;\\n }\\n\\n _useGlobalURI = newUseGlobalURI;\\n emit UseGlobalURIUpdated(newUseGlobalURI);\\n }\\n\\n /**\\n * @dev sets the controller address\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n * - controller address must not be set\\n */\\n function setController(address controllerAddress) external onlyAdmin {\\n if (_controller != address(0)) {\\n revert ControllerAlreadySet();\\n }\\n _controller = controllerAddress;\\n }\\n\\n modifier onlyController() {\\n _onlyController();\\n _;\\n }\\n\\n function _onlyController() private view {\\n if (msg.sender != _controller) {\\n revert OnlyController();\\n }\\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`, `tokenId`\\n */\\n function _baseURI() internal view virtual override returns (string memory) {\\n return __baseURI;\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n revert BatchNotSupported();\\n }\\n\\n if (from == address(0)) {\\n _ownedTokens[to].add(firstTokenId);\\n } else if (from != to) {\\n _ownedTokens[from].remove(firstTokenId);\\n }\\n if (to == address(0)) {\\n _ownedTokens[from].remove(firstTokenId);\\n } else if (to != from) {\\n _ownedTokens[to].add(firstTokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc79748684fcebab62bedf5de477bf25fb41f7462a17e76cbef449222182c5f54\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5062000047600160405180606001604052806035815260200162003994603591396040805160208101909152600081526200004d565b62000851565b600054610100900460ff16158080156200006e5750600054600160ff909116105b806200008a5750303b1580156200008a575060005460ff166001145b620000f35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000117576000805461ff0019166101001790555b6200012484848462000171565b80156200016b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600054610100900460ff16620001cd5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b620001d762000230565b6200021e604051806060016040528060218152602001620039736021913960408051808201909152600c81526b10d0549093d38b54d514905560a21b6020820152620002a2565b6200022b8383836200030e565b505050565b600054610100900460ff166200028c5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200029662000398565b620002a0620003f4565b565b600054610100900460ff16620002fe5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200030a8282620004aa565b5050565b600054610100900460ff166200036a5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b61012d805460ff191684151517905561012e62000388838262000754565b5061012f6200016b828262000754565b600054610100900460ff16620002a05760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b600054610100900460ff16620004505760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200045e6001600262000820565b60c9805461ffff191661ffff929092169190911790556200048f600080516020620039c98339815191528062000523565b620002a0600080516020620039c9833981519152336200056e565b600054610100900460ff16620005065760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b60fb62000514838262000754565b5060fc6200022b828262000754565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200030a82826200058082826200059a565b60008281526097602052604090206200022b90826200063e565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166200030a5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005fa3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000655836001600160a01b0384166200065e565b90505b92915050565b6000818152600183016020526040812054620006a75750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000658565b50600062000658565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620006db57607f821691505b602082108103620006fc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022b57600081815260208120601f850160051c810160208610156200072b5750805b601f850160051c820191505b818110156200074c5782815560010162000737565b505050505050565b81516001600160401b03811115620007705762000770620006b0565b6200078881620007818454620006c6565b8462000702565b602080601f831160018114620007c05760008415620007a75750858301515b600019600386901b1c1916600185901b1785556200074c565b600085815260208120601f198616915b82811015620007f157888601518255948401946001909101908401620007d0565b5085821015620008105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff8281168282160390808211156200084a57634e487b7160e01b600052601160045260246000fd5b5092915050565b61311280620008616000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a436172626f6e204175746f6d617465642054726164696e67205374726174656779697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." - }, - "ApprovalForAll(address,address,bool)": { - "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." - }, - "BaseExtensionUpdated(string)": { - "details": "triggered when updating the baseExtension" - }, - "BaseURIUpdated(string)": { - "details": "triggered when updating the baseURI" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `tokenId` token is transferred from `from` to `to`." - }, - "UseGlobalURIUpdated(bool)": { - "details": "triggered when updating useGlobalURI" - } - }, - "kind": "dev", - "methods": { - "approve(address,uint256)": { - "details": "See {IERC721-approve}." - }, - "balanceOf(address)": { - "details": "See {IERC721-balanceOf}." - }, - "burn(uint256)": { - "details": "destroys the voucher token for the given strategyId requirements: - the caller must be the controller address" - }, - "constructor": { - "details": "used to initialize the implementation" - }, - "controller()": { - "details": "returns the controller address" - }, - "getApproved(uint256)": { - "details": "See {IERC721-getApproved}." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(bool,string,string)": { - "details": "fully initializes the contract and its parents" - }, - "isApprovedForAll(address,address)": { - "details": "See {IERC721-isApprovedForAll}." - }, - "mint(address,uint256)": { - "details": "creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address" - }, - "name()": { - "details": "See {IERC721Metadata-name}." - }, - "ownerOf(uint256)": { - "details": "See {IERC721-ownerOf}." - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "safeTransferFrom(address,address,uint256)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "safeTransferFrom(address,address,uint256,bytes)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "setApprovalForAll(address,bool)": { - "details": "See {IERC721-setApprovalForAll}." - }, - "setBaseExtension(string)": { - "details": "sets the base extension requirements: - the caller must be the admin of this contract" - }, - "setBaseURI(string)": { - "details": "sets the base URI requirements: - the caller must be the admin of this contract" - }, - "setController(address)": { - "details": "sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set" - }, - "supportsInterface(bytes4)": { - "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." - }, - "symbol()": { - "details": "See {IERC721Metadata-symbol}." - }, - "tokenURI(uint256)": { - "details": "depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens" - }, - "tokensByOwner(address,uint256,uint256)": { - "details": "returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex" - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC721-transferFrom}." - }, - "useGlobalURI(bool)": { - "details": "sets the useGlobalURI flag requirements: - the caller must be the admin of this contract" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21198, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 21204, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 863, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_name", - "offset": 0, - "slot": "251", - "type": "t_string_storage" - }, - { - "astId": 865, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_symbol", - "offset": 0, - "slot": "252", - "type": "t_string_storage" - }, - { - "astId": 869, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_owners", - "offset": 0, - "slot": "253", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 873, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_balances", - "offset": 0, - "slot": "254", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 877, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_tokenApprovals", - "offset": 0, - "slot": "255", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 883, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_operatorApprovals", - "offset": 0, - "slot": "256", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" - }, - { - "astId": 1785, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "257", - "type": "t_array(t_uint256)44_storage" - }, - { - "astId": 24160, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_useGlobalURI", - "offset": 0, - "slot": "301", - "type": "t_bool" - }, - { - "astId": 24162, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__baseURI", - "offset": 0, - "slot": "302", - "type": "t_string_storage" - }, - { - "astId": 24164, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_baseExtension", - "offset": 0, - "slot": "303", - "type": "t_string_storage" - }, - { - "astId": 24169, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_ownedTokens", - "offset": 0, - "slot": "304", - "type": "t_mapping(t_address,t_struct(UintSet)11994_storage)" - }, - { - "astId": 24171, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_controller", - "offset": 0, - "slot": "305", - "type": "t_address" - }, - { - "astId": 24177, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "306", - "type": "t_array(t_uint256)45_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)44_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_address,t_struct(UintSet)11994_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct EnumerableSet.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)11994_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)11522_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 11517, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 11521, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)11994_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.UintSet", - "members": [ - { - "astId": 11993, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)11522_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/celo/Voucher_Proxy.json b/src/contracts/celo/Voucher_Proxy.json deleted file mode 100644 index 63b53f0..0000000 --- a/src/contracts/celo/Voucher_Proxy.json +++ /dev/null @@ -1,272 +0,0 @@ -{ - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "transactionIndex": 4, - "gasUsed": "894290", - "logsBloom": "0x000000048200000008000000000000004800000000000000000000000001000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000204000020000000040000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000001000000000000000100000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804", - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "logs": [ - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000005bca3389786385a35bca14c2d0582adc6cb2482e" - ], - "data": "0x", - "logIndex": 14, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 15, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 16, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 17, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - }, - { - "transactionIndex": 4, - "blockNumber": 26828276, - "transactionHash": "0xc21866e155ff58ef633d703c8f6dc307890c39bb19b1a5fbb551dafb5e26899f", - "address": "0x5E994Ac7d65d81f51a76e0bB5a236C6fDA8dBF9A", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f54099d787e26c90c487625b4de819ec5a9bdaa", - "logIndex": 18, - "blockHash": "0xd12141af7b5759b6d77a38f135aa08780f5f11b59fb3e3a523756199e74f8804" - } - ], - "blockNumber": 26828276, - "cumulativeGasUsed": "1444150", - "status": 1, - "byzantium": true - }, - "args": [ - "0x5bCA3389786385a35bca14C2D0582adC6cb2482e", - "0x0f54099D787e26c90c487625B4dE819eC5A9BDAA", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "eccaf0c7187879236db5b8ca00a4398f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000db038038062000db0833981016040819052620000269162000403565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620004e3565b60008051602062000d698339815191521462000075576200007562000505565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620004e3565b60008051602062000d4983398151915214620000d357620000d362000505565b6001600160a01b038216608081905260008051602062000d498339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a1505050506200056e565b62000147836200016e565b600082511180620001555750805b156200016957620001678383620001b0565b505b505050565b6200017981620001e1565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001d8838360405180606001604052806027815260200162000d896027913962000284565b90505b92915050565b6001600160a01b0381163b620002545760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b60008051602062000d6983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b620002ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200024b565b600080856001600160a01b0316856040516200030b91906200051b565b600060405180830381855af49150503d806000811462000348576040519150601f19603f3d011682016040523d82523d6000602084013e6200034d565b606091505b509092509050620003608282866200036c565b925050505b9392505050565b606083156200037d57508162000365565b8251156200038e5782518084602001fd5b8160405162461bcd60e51b81526004016200024b919062000539565b80516001600160a01b0381168114620003c257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003fa578181015183820152602001620003e0565b50506000910152565b6000806000606084860312156200041957600080fd5b6200042484620003aa565b92506200043460208501620003aa565b60408501519092506001600160401b03808211156200045257600080fd5b818601915086601f8301126200046757600080fd5b8151818111156200047c576200047c620003c7565b604051601f8201601f19908116603f01168101908382118183101715620004a757620004a7620003c7565b81604052828152896020848701011115620004c157600080fd5b620004d4836020830160208801620003dd565b80955050505050509250925092565b81810381811115620001db57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516200052f818460208701620003dd565b9190910192915050565b60208152600082518060208401526200055a816040850160208701620003dd565b601f01601f19169190910160400192915050565b60805161079d620005ac6000396000818160ef01528181610145015281816101c701528181610211015281816102420152610266015261079d6000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100be57610052565b36610052576100506100d3565b005b6100506100d3565b34801561006657600080fd5b5061005061007536600461063a565b6100ed565b610050610088366004610655565b610143565b34801561009957600080fd5b506100a26101c3565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ca57600080fd5b506100a261020d565b6100db610264565b6100eb6100e661032d565b610360565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361013b5761013881604051806020016040528060008152506000610384565b50565b6101386100d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036101bb576101b68383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610384915050565b505050565b6101b66100d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610202576101fd61032d565b905090565b61020a6100d3565b90565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361020257507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100eb5760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006101fd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b3660008037600080366000845af43d6000803e80801561037f573d6000f35b3d6000fd5b61038d836103af565b60008251118061039a5750805b156101b6576103a983836103ef565b50505050565b6103b88161041b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610414838360405180606001604052806027815260200161076a602791396104f1565b9392505050565b6001600160a01b0381163b6104985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610324565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6105705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610324565b600080856001600160a01b03168560405161058b91906106fc565b600060405180830381855af49150503d80600081146105c6576040519150601f19603f3d011682016040523d82523d6000602084013e6105cb565b606091505b50915091506105db8282866105e5565b9695505050505050565b606083156105f4575081610414565b8251156106045782518084602001fd5b8160405162461bcd60e51b81526004016103249190610718565b80356001600160a01b038116811461063557600080fd5b919050565b60006020828403121561064c57600080fd5b6104148261061e565b60008060006040848603121561066a57600080fd5b6106738461061e565b9250602084013567ffffffffffffffff8082111561069057600080fd5b818601915086601f8301126106a457600080fd5b8135818111156106b357600080fd5b8760208285010111156106c557600080fd5b6020830194508093505050509250925092565b60005b838110156106f35781810151838201526020016106db565b50506000910152565b6000825161070e8184602087016106d8565b9190910192915050565b60208152600082518060208401526107378160408501602087016106d8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000813000a", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "events": { - "AdminChanged(address,address)": { - "details": "Emitted when the admin account has changed." - }, - "BeaconUpgraded(address)": { - "details": "Emitted when the beacon is upgraded." - }, - "Upgraded(address)": { - "details": "Emitted when the implementation is upgraded." - } - }, - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonController.json b/src/contracts/ethereum/CarbonController.json deleted file mode 100644 index ede5963..0000000 --- a/src/contracts/ethereum/CarbonController.json +++ /dev/null @@ -1,1935 +0,0 @@ -{ - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleEmergencyStopper", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "transactionIndex": 151, - "gasUsed": "883617", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000600000020000000000000000000000080000000000000000000200004000004000000008080000008000000000200000000000000000000140000000000000040000000000000000000000a0000000000000800008000000000400000000000000000400000040000000000000001000000000000000000020000000000000000000040004000000000400000100200000000020000080200000000000000000020000000000000000000000000000100000000020", - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142", - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "logs": [ - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000006db6ee351fc802833ed2f28a25bbbf971d8b12c1" - ], - "data": "0x", - "logIndex": 248, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 249, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 250, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 251, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0xf28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 252, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 253, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 254, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 255, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - } - ], - "blockNumber": 17087375, - "cumulativeGasUsed": "10747163", - "status": 1, - "byzantium": true - }, - "args": [ - "0x6Db6EE351fc802833ed2f28A25BBBF971D8b12C1", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 4, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "postUpgrade", - "args": [ - "0x" - ] - }, - "implementation": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonController_Implementation.json b/src/contracts/ethereum/CarbonController_Implementation.json deleted file mode 100644 index aaebd0a..0000000 --- a/src/contracts/ethereum/CarbonController_Implementation.json +++ /dev/null @@ -1,2377 +0,0 @@ -{ - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IVoucher", - "name": "initVoucher", - "type": "address" - }, - { - "internalType": "address", - "name": "proxy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleEmergencyStopper", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "transactionIndex": 90, - "gasUsed": "5574455", - "logsBloom": "0x000000040000000008000000000000000800000000000000000000000000000000000000000000000000000000002000000000000000000040000000000000000000000000000000000000200000000000000000000000000000080000000000000000000200004000000000000008000000000000000000200000000000000000000140000000000000040000000000000000000000a0000000000000000008000000000400002000000000000400000040000000000000001000000000000000000000000000000000000000040000000000000000000100000000000020000080200000000000000000020000000000000000000000000000100000100000", - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9", - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "logs": [ - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 217, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - }, - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 218, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - }, - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 219, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - }, - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0xf28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 220, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - }, - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 221, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - }, - { - "transactionIndex": 90, - "blockNumber": 17920850, - "transactionHash": "0x7489aeb6111ccb2281ed811019534769db48bad05afaaa926f98af8bd4647f46", - "address": "0xD59BcAbd00721B754aCB79FE668faE4B6A063fF8", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 222, - "blockHash": "0xcef271e7438ccaaa2d866293675800c28852e3eeefc4a85a34d8c57f4623b5a9" - } - ], - "blockNumber": 17920850, - "cumulativeGasUsed": "14501085", - "status": 1, - "byzantium": true - }, - "args": [ - "0x3660F04B79751e31128f6378eAC70807e38f554E", - "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1" - ], - "numDeployments": 4, - "solcInputHash": "fd34102899bc98842934daeef711d0ee", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVoucher\",\"name\":\"initVoucher\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BalanceMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientCapacity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionStrategyId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowerThanMinReturn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeAmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OrderDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutDated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnknownDelegator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"pairId\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"PairTradingFeePPMUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"reason\",\"type\":\"uint8\"}],\"name\":\"StrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"tradingFeeAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"byTargetAmount\",\"type\":\"bool\"}],\"name\":\"TokensTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"TradingFeePPMUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"accumulatedFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeSourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controllerType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"}],\"name\":\"deleteStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pairTradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairs\",\"outputs\":[{\"internalType\":\"Token[2][]\",\"name\":\"\",\"type\":\"address[2][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleEmergencyStopper\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleFeesManager\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newPairTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setPairTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"strategiesByPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"strategiesByPairCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"strategy\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"minReturn\",\"type\":\"uint128\"}],\"name\":\"tradeBySourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"tradeByTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"currentOrders\",\"type\":\"tuple[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"newOrders\",\"type\":\"tuple[2]\"}],\"name\":\"updateStrategy\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Carbon Controller contract\",\"events\":{\"FeesWithdrawn(address,address,uint256,address)\":{\"details\":\"triggered when fees are withdrawn\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PairCreated(uint128,address,address)\":{\"details\":\"triggered when a new pair is created\"},\"PairTradingFeePPMUpdated(address,address,uint32,uint32)\":{\"details\":\"triggered when the custom trading fee for a given pair is updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is created\"},\"StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is deleted\"},\"StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)\":{\"details\":\"triggered when a strategy is updated\"},\"TokensTraded(address,address,address,uint256,uint256,uint128,bool)\":{\"details\":\"triggered when tokens are traded\"},\"TradingFeePPMUpdated(uint32,uint32)\":{\"details\":\"triggered when the network fee is updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"accumulatedFees(address)\":{\"details\":\"returns the amount of fees accumulated for the specified token\"},\"calculateTradeSourceAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the source amount required when trading by target amount\"},\"calculateTradeTargetAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the target amount expected when trading by source amount\"},\"constructor\":{\"details\":\"used to set immutable state variables and initialize the implementation\"},\"controllerType()\":{\"details\":\"returns the type of the controller\"},\"createPair(address,address)\":{\"details\":\"creates a new pair of provided token0 and token1\"},\"createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any\"},\"deleteStrategy(uint256)\":{\"details\":\"deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"pair(address,address)\":{\"details\":\"returns a pair's metadata matching the provided token0 and token1\"},\"pairTradingFeePPM(address,address)\":{\"details\":\"returns the trading fee for a given pair (in units of PPM)\"},\"pairs()\":{\"details\":\"returns a list of all supported pairs\"},\"pause()\":{\"details\":\"pauses the CarbonController requirements: - the caller must have the ROLE_EMERGENCY_STOPPER privilege\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"roleEmergencyStopper()\":{\"details\":\"returns the emergency stopper role\"},\"roleFeesManager()\":{\"details\":\"returns the fees manager role\"},\"setPairTradingFeePPM(address,address,uint32)\":{\"details\":\"sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"setTradingFeePPM(uint32)\":{\"details\":\"sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"strategiesByPair(address,address,uint256,uint256)\":{\"details\":\"returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex\"},\"strategiesByPairCount(address,address)\":{\"details\":\"returns the count of strategies belonging to a specific pair\"},\"strategy(uint256)\":{\"details\":\"returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradingFeePPM()\":{\"details\":\"returns the trading fee (in units of PPM)\"},\"unpause()\":{\"details\":\"resumes the CarbonController requirements: - the caller must have the ROLE_EMERGENCY_STOPPER privilege\"},\"updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any\"},\"withdrawFees(address,uint256,address)\":{\"details\":\"transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/carbon/CarbonController.sol\":\"CarbonController\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xcef50f95b43b038aa40aed25b62fc45906c681a5c1d504a4fdcf3bc6330a8d4b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/carbon/CarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { PausableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Pairs, Pair } from \\\"./Pairs.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Strategies, Strategy, TradeAction, Order, TradeTokens } from \\\"./Strategies.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { ICarbonController } from \\\"./interfaces/ICarbonController.sol\\\";\\nimport { Utils, AccessDenied } from \\\"../utility/Utils.sol\\\";\\nimport { OnlyProxyDelegate } from \\\"../utility/OnlyProxyDelegate.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev Carbon Controller contract\\n */\\ncontract CarbonController is\\n ICarbonController,\\n Pairs,\\n Strategies,\\n Upgradeable,\\n ReentrancyGuardUpgradeable,\\n PausableUpgradeable,\\n OnlyProxyDelegate,\\n Utils\\n{\\n // the emergency manager role is required to pause/unpause\\n bytes32 private constant ROLE_EMERGENCY_STOPPER = keccak256(\\\"ROLE_EMERGENCY_STOPPER\\\");\\n\\n // the fees manager role is required to withdraw fees\\n bytes32 private constant ROLE_FEES_MANAGER = keccak256(\\\"ROLE_FEES_MANAGER\\\");\\n\\n uint16 private constant CONTROLLER_TYPE = 1;\\n\\n // the voucher contract\\n IVoucher private immutable _voucher;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP] private __gap;\\n\\n error IdenticalAddresses();\\n error UnnecessaryNativeTokenReceived();\\n error InsufficientNativeTokenReceived();\\n error DeadlineExpired();\\n\\n /**\\n * @dev used to set immutable state variables and initialize the implementation\\n */\\n constructor(IVoucher initVoucher, address proxy) OnlyProxyDelegate(proxy) {\\n _validAddress(address(initVoucher));\\n\\n _voucher = initVoucher;\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonController_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonController_init() internal onlyInitializing {\\n __Pairs_init();\\n __Strategies_init();\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n __Pausable_init();\\n\\n __CarbonController_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonController_init_unchained() internal onlyInitializing {\\n // set up administrative roles\\n _setRoleAdmin(ROLE_EMERGENCY_STOPPER, ROLE_ADMIN);\\n _setRoleAdmin(ROLE_FEES_MANAGER, ROLE_ADMIN);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure virtual override(IVersioned, Upgradeable) returns (uint16) {\\n return 4;\\n }\\n\\n /**\\n * @dev returns the emergency stopper role\\n */\\n function roleEmergencyStopper() external pure returns (bytes32) {\\n return ROLE_EMERGENCY_STOPPER;\\n }\\n\\n /**\\n * @dev returns the fees manager role\\n */\\n function roleFeesManager() external pure returns (bytes32) {\\n return ROLE_FEES_MANAGER;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function controllerType() external pure virtual returns (uint16) {\\n return CONTROLLER_TYPE;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradingFeePPM() external view returns (uint32) {\\n return _tradingFeePPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32) {\\n Pair memory _pair = _pair(token0, token1);\\n return _getPairTradingFeePPM(_pair.id);\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTradingFeePPM(uint32 newTradingFeePPM) external onlyAdmin validFee(newTradingFeePPM) {\\n _setTradingFeePPM(newTradingFeePPM);\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPairTradingFeePPM(\\n Token token0,\\n Token token1,\\n uint32 newPairTradingFeePPM\\n ) external onlyAdmin validFee(newPairTradingFeePPM) {\\n Pair memory _pair = _pair(token0, token1);\\n _setPairTradingFeePPM(_pair, newPairTradingFeePPM);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createPair(\\n Token token0,\\n Token token1\\n ) external nonReentrant whenNotPaused onlyProxyDelegate returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _createPair(token0, token1);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairs() external view returns (Token[2][] memory) {\\n return _pairs();\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _pair(token0, token1);\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createStrategy(\\n Token token0,\\n Token token1,\\n Order[2] calldata orders\\n ) external payable nonReentrant whenNotPaused onlyProxyDelegate returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !token0.isNative() && !token1.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(orders);\\n\\n // create the pair if it does not exist\\n Pair memory strategyPair;\\n if (!_pairExists(token0, token1)) {\\n strategyPair = _createPair(token0, token1);\\n } else {\\n strategyPair = _pair(token0, token1);\\n }\\n\\n Token[2] memory tokens = [token0, token1];\\n return _createStrategy(_voucher, tokens, orders, strategyPair, msg.sender, msg.value);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable nonReentrant whenNotPaused onlyProxyDelegate {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !strategyPair.tokens[0].isNative() && !strategyPair.tokens[1].isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(newOrders);\\n\\n // perform update\\n _updateStrategy(strategyId, currentOrders, newOrders, strategyPair, msg.sender, msg.value);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function deleteStrategy(uint256 strategyId) external nonReentrant whenNotPaused onlyProxyDelegate {\\n // find strategy, reverts if none\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // delete strategy\\n _deleteStrategy(strategyId, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategy(uint256 id) external view returns (Strategy memory) {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(id));\\n return _strategy(id, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPair(strategyPair, startIndex, endIndex, _voucher);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPairCount(strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable nonReentrant whenNotPaused onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, minReturn);\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: false,\\n constraint: minReturn,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable nonReentrant whenNotPaused onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, maxInput);\\n\\n if (sourceToken.isNative()) {\\n // tx's value should at least match the maxInput\\n if (msg.value < maxInput) {\\n revert InsufficientNativeTokenReceived();\\n }\\n }\\n\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: true,\\n constraint: maxInput,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, true);\\n return amounts.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, false);\\n return amounts.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function accumulatedFees(Token token) external view validAddress(Token.unwrap(token)) returns (uint256) {\\n return _accumulatedFees[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function withdrawFees(\\n Token token,\\n uint256 amount,\\n address recipient\\n )\\n external\\n whenNotPaused\\n onlyRoleMember(ROLE_FEES_MANAGER)\\n validAddress(recipient)\\n validAddress(Token.unwrap(token))\\n greaterThanZero(amount)\\n nonReentrant\\n returns (uint256)\\n {\\n return _withdrawFees(msg.sender, amount, token, recipient);\\n }\\n\\n /**\\n * @dev pauses the CarbonController\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_EMERGENCY_STOPPER privilege\\n */\\n function pause() external onlyRoleMember(ROLE_EMERGENCY_STOPPER) {\\n _pause();\\n }\\n\\n /**\\n * @dev resumes the CarbonController\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_EMERGENCY_STOPPER privilege\\n */\\n function unpause() external onlyRoleMember(ROLE_EMERGENCY_STOPPER) {\\n _unpause();\\n }\\n\\n /**\\n * @dev validates both tokens are valid addresses and unique\\n */\\n function _validateInputTokens(\\n Token token0,\\n Token token1\\n ) private pure validAddress(Token.unwrap(token0)) validAddress(Token.unwrap(token1)) {\\n if (token0 == token1) {\\n revert IdenticalAddresses();\\n }\\n }\\n\\n /**\\n * performs all necessary validations on the trade parameters\\n */\\n function _validateTradeParams(\\n Token sourceToken,\\n Token targetToken,\\n uint256 deadline,\\n uint256 value,\\n uint128 constraint\\n ) private view {\\n // revert if deadline has passed\\n if (deadline < block.timestamp) {\\n revert DeadlineExpired();\\n }\\n\\n // validate minReturn / maxInput\\n _greaterThanZero(constraint);\\n\\n // make sure source and target tokens are valid\\n _validateInputTokens(sourceToken, targetToken);\\n\\n // there shouldn't be any native token sent unless the source token is the native token\\n if (value > 0 && !sourceToken.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5b9becbbf091afbeabddfcb5e8057f58c20e9b53d208ff47d160716369a1d5f\",\"license\":\"BUSL-1.1\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xe238883c87615a13ecedcf1b1e4f4a6576f89a763b9c5d8b1296573675b2cd53\",\"license\":\"BUSL-1.1\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { MathUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { SafeCastUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using MathUpgradeable for uint256;\\n using SafeCastUpgradeable for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 2000; // 0.2%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = MathUpgradeable.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n return MathEx.mulDivF(temp2, temp3 / factor, temp4 + temp5);\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = MathUpgradeable.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x27d4d04250eff1c56130176703e26a26ad03ba50fe97345c22a921e4d3a7f3b2\",\"license\":\"BUSL-1.1\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xfa9236fc6a200faac750c93ad105333133e3676c0483a7a97675b2c9e8834b06\",\"license\":\"BUSL-1.1\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x5877f3f23877d040294d2fad57e36b933a9b44efccc49c03218723d8e71d0062\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x80e0622d62d1415b8e19109151b13705e5b593ffe4fa1c39ea91b6eb27cfd760\",\"license\":\"BUSL-1.1\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x944fc558dec8d96c2caeb5a5a597773911cc061a8a7f7d0c56e7fdaa75e6e408\",\"license\":\"BUSL-1.1\"},\"contracts/utility/OnlyProxyDelegate.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev restrict delegation\\n */\\nabstract contract OnlyProxyDelegate {\\n address private immutable _proxy;\\n\\n error UnknownDelegator();\\n\\n constructor(address proxy) {\\n _proxy = proxy;\\n }\\n\\n modifier onlyProxyDelegate() {\\n _onlyProxyDelegate();\\n\\n _;\\n }\\n\\n function _onlyProxyDelegate() internal view {\\n if (address(this) != _proxy) {\\n revert UnknownDelegator();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x552adffb3b2e330d12e5f70f6be9c13190edfed9838ac5b1d7cf07ce1b56ad27\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3e376fff44513f87ffb6359969ad0bd3221651c5c64f5458d5aba36d095cb155\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1954602c3b1d518b123fefd16e00ac2e22084e781abb89c3089f7dc829f20fd9\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xa13bde2a8b00010d003c933cd20d11379c2fa99ae0349c4765bd81ddb7cb2eb8\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0x96ab608c8ed8b0363984868c5e42f5a4f22f2f9e67a6630ba174fb5be750c360\",\"license\":\"BUSL-1.1\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x645f48b84cb30d91cc7e6b01defb0d856edf73db11ac1f083455a776b428f979\",\"license\":\"BUSL-1.1\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200691c3803806200691c833981016040819052620000349162000991565b6001600160a01b0381166080526200004c826200006b565b6001600160a01b03821660a0526200006362000096565b5050620009d0565b6001600160a01b038116620000935760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000b75750600054600160ff909116105b80620000d35750303b158015620000d3575060005460ff166001145b6200013c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000160576000805461ff0019166101001790555b6200016a620001b3565b801562000093576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200020f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002196200024d565b62000223620002b3565b6200022d62000319565b6200023762000389565b62000241620003ef565b6200024b62000455565b565b600054610100900460ff16620002a95760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200024b62000527565b600054610100900460ff166200030f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200024b62000583565b600054610100900460ff16620003755760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200037f62000527565b6200024b620005ec565b600054610100900460ff16620003e55760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200024b6200068d565b600054610100900460ff166200044b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200024b620006f1565b600054610100900460ff16620004b15760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620004ec7ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845600080516020620068dc8339815191526200075a565b6200024b7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16600080516020620068dc8339815191526200075a565b600054610100900460ff166200024b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600054610100900460ff16620005df5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200024b6107d0620007a5565b600054610100900460ff16620006485760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b61012d805461ffff1916600117905562000672600080516020620068dc833981519152806200075a565b6200024b600080516020620068dc833981519152336200082a565b600054610100900460ff16620006e95760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600161015f55565b600054610100900460ff166200074d5760405162461bcd60e51b815260206004820152602b6024820152600080516020620068fc83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b610191805460ff19169055565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655463ffffffff600160801b90910481169082168103620007c5575050565b6065805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b6200083682826200083a565b5050565b62000846828262000865565b600082815260fb6020526040902062000860908262000909565b505050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166200083657600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620008c53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000920836001600160a01b03841662000929565b90505b92915050565b6000818152600183016020526040812054620009725750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000923565b50600062000923565b6001600160a01b03811681146200009357600080fd5b60008060408385031215620009a557600080fd5b8251620009b2816200097b565b6020840151909250620009c5816200097b565b809150509250929050565b60805160a051615ec362000a19600039600081816109a601528181610e8301528181610f2d0152818161109d015281816113270152611381015260006115300152615ec36000f3fe6080604052600436106102855760003560e01c80638cd2403d11610153578063c9c65396116100cb578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461077c578063fcf66664146107a9578063ffb0a4a0146107c957600080fd5b8063f2bda26d14610749578063f727473a1461076957600080fd5b8063d547741f116100b0578063d547741f146106e7578063f06f8acd14610707578063f1c5e0141461073657600080fd5b8063c9c65396146106a7578063ca15c873146106c757600080fd5b80639ba372c211610122578063b76040cd11610107578063b76040cd14610631578063ba0a868b14610645578063bc88d7e41461067a57600080fd5b80639ba372c2146105fc578063a217fddf1461061c57600080fd5b80638cd2403d1461052b5780639010d07c1461054b57806391d148541461058357806393867fb5146105c957600080fd5b80633f4ba83a1161020157806369a4dea7116101b55780638456cb591161019a5780638456cb59146104c95780638672d545146104de578063873020371461050b57600080fd5b806369a4dea7146104945780638129fc1c146104b457600080fd5b806354fd4d50116101e657806354fd4d501461043857806355817d1d1461045b5780635c975abb1461047b57600080fd5b80633f4ba83a146103f057806341f435b31461040557600080fd5b80632ab2fad1116102585780632f2ff15d1161023d5780632f2ff15d14610390578063322cf844146103b057806336568abe146103d057600080fd5b80632ab2fad11461033d5780632c40de1b1461035d57600080fd5b806301ffc9a71461028a578063102ee9ba146102bf57806321589fa1146102ea578063248a9ca3146102ff575b600080fd5b34801561029657600080fd5b506102aa6102a5366004615353565b6107eb565b60405190151581526020015b60405180910390f35b6102d26102cd36600461540b565b610847565b6040516001600160801b0390911681526020016102b6565b6102fd6102f836600461549e565b610961565b005b34801561030b57600080fd5b5061032f61031a3660046154de565b600090815260c9602052604090206001015490565b6040519081526020016102b6565b34801561034957600080fd5b506102d26103583660046154f7565b610ad5565b34801561036957600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b1661032f565b34801561039c57600080fd5b506102fd6103ab36600461555c565b610b2f565b3480156103bc57600080fd5b5061032f6103cb36600461558c565b610b54565b3480156103dc57600080fd5b506102fd6103eb36600461555c565b610b77565b3480156103fc57600080fd5b506102fd610c08565b34801561041157600080fd5b507ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c084561032f565b34801561044457600080fd5b5060045b60405161ffff90911681526020016102b6565b34801561046757600080fd5b506102fd6104763660046155ce565b610c3e565b34801561048757600080fd5b506101915460ff166102aa565b3480156104a057600080fd5b506102fd6104af36600461560c565b610c91565b3480156104c057600080fd5b506102fd610cce565b3480156104d557600080fd5b506102fd610ded565b3480156104ea57600080fd5b506104fe6104f936600461558c565b610e20565b6040516102b69190615653565b34801561051757600080fd5b506102fd6105263660046154de565b610e43565b34801561053757600080fd5b506102fd610546366004615677565b610f5e565b34801561055757600080fd5b5061056b6105663660046156e9565b610fcb565b6040516001600160a01b0390911681526020016102b6565b34801561058f57600080fd5b506102aa61059e36600461555c565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156105d557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509661032f565b34801561060857600080fd5b5061032f61061736600461570b565b610fe3565b34801561062857600080fd5b5061032f600081565b34801561063d57600080fd5b506001610448565b34801561065157600080fd5b5061066561066036600461558c565b611062565b60405163ffffffff90911681526020016102b6565b34801561068657600080fd5b5061069a6106953660046154de565b61107e565b6040516102b691906157ef565b3480156106b357600080fd5b506104fe6106c236600461558c565b6110c2565b3480156106d357600080fd5b5061032f6106e23660046154de565b611103565b3480156106f357600080fd5b506102fd61070236600461555c565b61111a565b34801561071357600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610665565b6102d261074436600461540b565b61113f565b34801561075557600080fd5b506102d26107643660046154f7565b6111f5565b61032f6107773660046157fe565b61124b565b34801561078857600080fd5b5061079c61079736600461583e565b61135f565b6040516102b69190615884565b3480156107b557600080fd5b5061032f6107c43660046158d3565b6113a5565b3480156107d557600080fd5b506107de6113ce565b6040516102b691906158f0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806108415750610841826113dd565b92915050565b6000610851611474565b6108596114cf565b610861611525565b61086e8787853486611587565b610880876001600160a01b031661161a565b156108c857816001600160801b03163410156108c8576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108d48888611641565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e08201529091506109458787836116e5565b60c00151915050610957600161015f55565b9695505050505050565b610969611474565b6109716114cf565b610979611525565b600061098d6109888560801c90565b611caa565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a19919061593d565b6001600160a01b0316336001600160a01b031614610a4a57604051634ca8886760e01b815260040160405180910390fd5b600034118015610a7657506020810151610a749060005b60200201516001600160a01b031661161a565b155b8015610a8f57506020810151610a8d906001610a61565b155b15610aad57604051631334bf4f60e11b815260040160405180910390fd5b610ab682611d82565b610ac4848484843334611f0e565b50610ad0600161015f55565b505050565b6000610ae18585612326565b6000610aed8686611641565b604080518082019091526001600160a01b038089168252871660208201529091506000610b1d8287878685612385565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610b4a81612549565b610ad08383612553565b6000610b608383612326565b6000610b6c8484611641565b9050610b2781612575565b6001600160a01b0381163314610bfa5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610c048282612597565b5050565b7ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845610c3381336125b9565b610c3b6125fc565b50565b610c687f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336125b9565b80610c728161264f565b6000610c7e8585611641565b9050610c8a8184612692565b5050505050565b610cbb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336125b9565b80610cc58161264f565b610c048261277b565b600054610100900460ff1615808015610cee5750600054600160ff909116105b80610d085750303b158015610d08575060005460ff166001145b610d7a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf1565b6000805460ff191660011790558015610d9d576000805461ff0019166101001790555b610da5612831565b8015610c3b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b7ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845610e1881336125b9565b610c3b6128cc565b610e286151ce565b610e328383612326565b610e3c8383611641565b9392505050565b610e4b611474565b610e536114cf565b610e5b611525565b6000610e6a6109888360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610ed2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef6919061593d565b6001600160a01b0316336001600160a01b031614610f2757604051634ca8886760e01b815260040160405180910390fd5b610f52827f00000000000000000000000000000000000000000000000000000000000000008361290a565b50610c3b600161015f55565b61012d54600090610f749061ffff166001615986565b905061ffff8116600414610fb4576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610e3c9083612ac9565b6000610fed6114cf565b7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b1661101881336125b9565b8261102281612ad5565b8561102c81612ad5565b8561103681612b15565b61103e611474565b61104a33888a89612b4f565b9450611057600161015f55565b505050509392505050565b60008061106f8484611641565b9050610b278160000151612c03565b6110866151f6565b60006110956109888460801c90565b9050610e3c837f000000000000000000000000000000000000000000000000000000000000000083612c52565b6110ca6151ce565b6110d2611474565b6110da6114cf565b6110e2611525565b6110ec8383612326565b6110f68383612d53565b9050610841600161015f55565b600081815260fb6020526040812061084190612eb5565b600082815260c9602052604090206001015461113581612549565b610ad08383612597565b6000611149611474565b6111516114cf565b611159611525565b6111668787853486611587565b60006111728888611641565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e08101919091529091506111e38787836116e5565b60e00151915050610957600161015f55565b60006112018585612326565b600061120d8686611641565b604080518082019091526001600160a01b03808916825287166020820152909150600061123e828787866001612385565b5198975050505050505050565b6000611255611474565b61125d6114cf565b611265611525565b61126f8484612326565b60003411801561128e575061128c846001600160a01b031661161a565b155b80156112a957506112a7836001600160a01b031661161a565b155b156112c757604051631334bf4f60e11b815260040160405180910390fd5b6112d082611d82565b6112d86151ce565b6112e28585612ebf565b6112f7576112f08585612d53565b9050611304565b6113018585611641565b90505b604080518082019091526001600160a01b038087168252851660208201526113507f00000000000000000000000000000000000000000000000000000000000000008286853334612f22565b92505050610e3c600161015f55565b606061136b8585612326565b60006113778686611641565b90506109578185857f000000000000000000000000000000000000000000000000000000000000000061314f565b6000816113b181612ad5565b50506001600160a01b031660009081526068602052604090205490565b60606113d8613294565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061084157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610841565b600261015f54036114c75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bf1565b600261015f55565b6101915460ff16156115235760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610bf1565b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611523576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b428310156115c1576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115d3816001600160801b0316612b15565b6115dd8585612326565b6000821180156115fc57506115fa856001600160a01b031661161a565b155b15610c8a57604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610841565b6116496151ce565b6116538383612ebf565b611689576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061169584846133b3565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b60006117248260200151602001518360a001516020015160006002811061170e5761170e61595a565b60200201516001600160a01b0390811691161490565b905060005b83811015611a205760008585838181106117455761174561595a565b905060400201602001602081019061175d91906159a1565b905060008686848181106117735761177361595a565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116117a357505050505090506000806117c983613419565b915091506117e08960a0015160000151868861350d565b6000808215158a1515146117fa5783516020850151611802565b602084015184515b91509150600080611818848b8f604001516135a4565b91509150806001600160801b031684600001516001600160801b0316101561186c576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b0316845282518290849061188d9083906159bc565b6001600160801b03908116909152845160208601519082169116101590506118c05782516001600160801b031660208401525b60006118cc8787613680565b80518a55602080820151908a0151919250146118ed57602081015160018a01555b604080820151908901511461190757604081015160028a01555b8d60a00151602001518661191c57600161191f565b60005b60ff16600281106119325761193261595a565b60200201516001600160a01b03168e60a001516020015187611955576000611958565b60015b60ff166002811061196b5761196b61595a565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516119bc939291906159dc565b60405180910390a4828e60c0018181516119d691906159bc565b6001600160801b031690525060e08e0180518391906119f69083906159bc565b6001600160801b0316905250611a199a508b99506137ae98505050505050505050565b9050611729565b506000826040015115611aee576000611a458460c001518560a00151600001516137b4565b90508360c0015181611a579190615a7a565b6001600160801b0380831660c08701819052606087015192945091161015611aab576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b0385169290611ae2908490615a9a565b90915550611bac915050565b6000611b068460e001518560a00151600001516137eb565b9050808460e00151611b189190615a7a565b6001600160801b0380831660e08701819052606087015192945091161115611b6c576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b0385169290611ba5908490615a9a565b9091555050505b611bd783602001516000015184600001518560c001516001600160801b031686608001516000613825565b611bfb83602001516020015184600001518560e001516001600160801b031661394d565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611c9394939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611cb26151ce565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611cdb575050505050905060006001600160a01b031681600060028110611d1d57611d1d61595a565b60200201516001600160a01b031603611d62576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610c0457818160028110611da057611da061595a565b608002016000016020810190611db691906159a1565b6001600160801b0316828260028110611dd157611dd161595a565b608002016020016020810190611de791906159a1565b6001600160801b03161015611e28576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e6f828260028110611e3d57611e3d61595a565b608002016040016020810190611e539190615ac5565b67ffffffffffffffff166601000000000000908190041c151590565b611ea5576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ed0828260028110611eba57611eba61595a565b608002016060016020810190611e539190615ac5565b611f06576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611d85565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611f325750505050509050600080611f5883613419565b604080518082019091529193509150611fa8908a60026000835b82821015611f9e57611f8f60808302850136819003810190615af6565b81526020019060010190611f72565b5050505083613998565b611fde576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260009061202b908a600284835b828210156120215761201260808302850136819003810190615af6565b81526020019060010190611ff5565b5050505083613680565b805185519192501461203c57805185555b602080820151908501511461205657602081015160018601555b604080820151908501511461207057604081015160028601555b600061207c8984613af7565b905060005b60028110156122be57600082826002811061209e5761209e61595a565b602002015190508582600281106120b7576120b761595a565b6020020151516001600160801b03168c83600281106120d8576120d861595a565b6080020160000160208101906120ee91906159a1565b6001600160801b031610156121655760008c83600281106121115761211161595a565b60800201600001602081019061212791906159a1565b8784600281106121395761213961595a565b6020020151516121499190615a7a565b905061215f828c836001600160801b031661394d565b50612224565b8582600281106121775761217761595a565b6020020151516001600160801b03168c83600281106121985761219861595a565b6080020160000160208101906121ae91906159a1565b6001600160801b031611156122245760008683600281106121d1576121d161595a565b6020020151518d84600281106121e9576121e961595a565b6080020160000160208101906121ff91906159a1565b6122099190615a7a565b9050612222828c836001600160801b03168d6001613825565b505b6000891180156122415750612241816001600160a01b031661161a565b801561229d575085826002811061225a5761225a61595a565b6020020151516001600160801b03168c836002811061227b5761227b61595a565b60800201600001602081019061229191906159a1565b6001600160801b031611155b156122b5576122b56001600160a01b038b168a613b7a565b50600101612081565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d90612310908f906080820190600090615be0565b60405180910390a4505050505050505050505050565b8161233081612ad5565b8161233a81612ad5565b6001600160a01b038085169084160361237f576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006123ba8760200151856020015160006002811061170e5761170e61595a565b905060005b858110156124f95760008787838181106123db576123db61595a565b90506040020160200160208101906123f391906159a1565b905060008888848181106124095761240961595a565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b815481526020019060010190808311612439575050505050905060008061245f83613419565b915091506124728a60000151858761350d565b60008115158815151461248657825161248c565b60208301515b905060008061249c83898e6135a4565b91509150818b6000018181516124b291906159bc565b6001600160801b031690525060208b0180518291906124d29083906159bc565b6001600160801b03169052506124f297508896506137ae95505050505050565b90506123bf565b50821561251e578151845161250e91906137b4565b6001600160801b0316825261253f565b612530826020015185600001516137eb565b6001600160801b031660208301525b5095945050505050565b610c3b8133613c93565b61255d8282613d08565b600082815260fb60205260409020610ad09082613daa565b80516001600160801b03166000908152606760205260408120610e3c81612eb5565b6125a18282613dbf565b600082815260fb60205260409020610ad09082613e42565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457604051634ca8886760e01b815260040160405180910390fd5b612604613e57565b610191805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b620f424063ffffffff82161115610c3b576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff90811690821681036126c257505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161276e92919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff700100000000000000000000000000000000909104811690821681036127a7575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff1661289c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6128a4613eaa565b6128ac613f1d565b6128b4613f90565b6128bc61400b565b6128c461407e565b6115236140f1565b6128d46114cf565b610191805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126323390565b6000612917848484612c52565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916129639160040190815260200190565b600060405180830381600087803b15801561297d57600080fd5b505af1158015612991573d6000803e3d6000fd5b5050825160009081526066602052604081208181556001810182905560020155506129b99050565b805182516001600160801b031660009081526067602052604090206129dd916141f0565b5060408101515160208201516060830151612a0b92919060005b6020020151516001600160801b031661394d565b6040810151602090810151908201516060830151612a2c92919060016129f7565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b684600001518560600151600060028110612a9b57612a9b61595a565b6020020151606087015160016020020151604051612abb93929190615bfc565b60405180910390a450505050565b6000610e3c83836141fc565b6001600160a01b038116610c3b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610c3b576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038216600090815260686020526040812054808203612b79576000915050610b27565b80851115612b85578094505b612b8f8582615c93565b6001600160a01b038516600090815260686020526040902055612bb384848761394d565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff168015612c2e5780610e3c565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b612c5a6151f6565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc6919061593d565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612cec5750505050509050600080612d1283613419565b915091506000612d228783613af7565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612d5b6151ce565b612d658383612ebf565b15612d9c576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612da884846133b3565b603354909150600090612dc5906001600160801b031660016159bc565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612e0990836002615222565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b6000610841825490565b600080612ecc84846133b3565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612f18576000915050610841565b5060019392505050565b8451600090612f56908487845b608002016000016020810190612f4591906159a1565b6001600160801b0316856001613825565b6020860151612f689084876001612f2f565b606554600090612f82906001600160801b031660016159bc565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612fdd9082614226565b5087516020870151600091612ff391600161170e565b60408051808201909152909150613041908960026000835b828210156130375761302860808302850136819003810190615af6565b8152602001906001019061300b565b5050505082613680565b600083815260666020526040902061305a91600361528e565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b1580156130be57600080fd5b505af11580156130d2573d6000803e3d6000fd5b50505050886001600281106130e9576130e961595a565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d9061313a9087908e906080820190615ca6565b60405180910390a45098975050505050505050565b83516001600160801b0316600090815260676020526040812060609161317482612eb5565b905084158061318257508085115b1561318b578094505b848611156131c5576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006131d18787615c93565b905060008167ffffffffffffffff8111156131ee576131ee615ae0565b60405190808252806020026020018201604052801561322757816020015b6132146151f6565b81526020019060019003908161320c5790505b50905060005b8281101561328757600061324b613244838c615a9a565b8790612ac9565b905061325881898d612c52565b83838151811061326a5761326a61595a565b6020026020010181905250506132808160010190565b905061322d565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff8111156132be576132be615ae0565b6040519080825280602002602001820160405280156132f757816020015b6132e46152bc565b8152602001906001900390816132dc5790505b50905060005b826001600160801b0316816001600160801b031610156133ac57603560006133268360016159bc565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b0316815260019091019060200180831161335157505050505082826001600160801b03168151811061338e5761338e61595a565b602002602001018190525080806133a490615cc8565b9150506132fd565b5092915050565b6133bb6152bc565b816001600160a01b0316836001600160a01b0316106133f757604080518082019091526001600160a01b03808416825284166020820152610e3c565b50604080518082019091526001600160a01b0392831681529116602082015290565b6134216152da565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c16001886002600381106134c2576134c261595a565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166135218360801c90565b6001600160801b031614613561576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b0316600003610ad0576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b0316905060006135f7886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b90506000613625896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156136555761364b613646896001600160801b031686868686614232565b614331565b9550879450613674565b879550613671613646896001600160801b0316868686866143b4565b94505b50505050935093915050565b613688615320565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff0000000000000000000000000000000016911617919091179082015290810183613731576000613753565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b6000806137c083612c03565b9050610b276136466001600160801b038616620f42406137e08582615cee565b63ffffffff1661449b565b6000806137f783612c03565b9050610b276136466001600160801b03861661381684620f4240615cee565b63ffffffff16620f4240614503565b613837856001600160a01b031661161a565b156138a05782821015613876576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561389b5761389b61388b8484615c93565b6001600160a01b03861690613b7a565b610c8a565b8215610c8a5780156139385760006138c16001600160a01b038716306145f7565b90506138d86001600160a01b03871686308761469e565b60006138ed6001600160a01b038816306145f7565b9050846138fa8383615c93565b14613931576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610c8a565b610c8a6001600160a01b03861685308661469e565b8060000361395a57505050565b61396c836001600160a01b031661161a565b1561398457610ad06001600160a01b03831682613b7a565b610ad06001600160a01b03841683836146c8565b6000805b6002811015612f18578281600281106139b7576139b761595a565b6020020151516001600160801b03168482600281106139d8576139d861595a565b6020020151516001600160801b0316141580613a3a5750828160028110613a0157613a0161595a565b6020020151602001516001600160801b0316848260028110613a2557613a2561595a565b6020020151602001516001600160801b031614155b80613a8d5750828160028110613a5257613a5261595a565b60200201516040015167ffffffffffffffff16848260028110613a7757613a7761595a565b60200201516040015167ffffffffffffffff1614155b80613ae05750828160028110613aa557613aa561595a565b60200201516060015167ffffffffffffffff16848260028110613aca57613aca61595a565b60200201516060015167ffffffffffffffff1614155b15613aef576000915050610841565b60010161399c565b613aff6152bc565b81613b0e578260200151610e3c565b60405180604001604052808460200151600160028110613b3057613b3061595a565b60200201516001600160a01b03166001600160a01b031681526020018460200151600060028110613b6357613b6361595a565b60200201516001600160a01b031690529392505050565b80471015613bca5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bf1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c17576040519150601f19603f3d011682016040523d82523d6000602084013e613c1c565b606091505b5050905080610ad05760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bf1565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457613cc68161472d565b613cd183602061473f565b604051602001613ce2929190615d45565b60408051601f198184030181529082905262461bcd60e51b8252610bf191600401615dc6565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613d663390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e3c836001600160a01b038416614968565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610c0457600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e3c836001600160a01b0384166149b7565b6101915460ff166115235760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bf1565b600054610100900460ff16613f155760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614aaa565b600054610100900460ff16613f885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614b15565b600054610100900460ff16613ffb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b614003614aaa565b611523614b8b565b600054610100900460ff166140765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614c59565b600054610100900460ff166140e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614cc4565b600054610100900460ff1661415c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6141a67ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c08457f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096614d3c565b6115237f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096614d3c565b6000610e3c83836149b7565b60008260000182815481106142135761421361595a565b9060005260206000200154905092915050565b6000610e3c8383614968565b6000826000036142a15781600003614276576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61429a8661428b660100000000000080615df9565b6142958580615df9565b61449b565b9050614328565b660100000000000084028584028386020160006142be868a615df9565b6142c89083615c93565b905060006142d68485614d87565b905060006142e48484614d87565b905060006142f28383614db6565b9050600061430187888461449b565b90506000614310878785614503565b905061431d8e838361449b565b985050505050505050505b95945050505050565b60006001600160801b038211156143b05760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610bf1565b5090565b60008260000361441c57816000036143f8576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61429a866144068480615df9565b614417660100000000000080615df9565b614503565b660100000000000084028584028386020160006144398983615df9565b905060006144478485614d87565b905060006144558389614d87565b905060006144638383614db6565b9050600061447287888461449b565b90506000614481868c8561449b565b905061431d876144918589615e10565b6144178486615a9a565b6000806144a9858585614503565b905060006144b8868686614dcc565b1115610b275760001981106144f9576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610e3c565b60008060006145128686614de7565b91509150816000036145375783818161452d5761452d615d0b565b0492505050610e3c565b838210614570576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061457d878787614dcc565b905060008061458d858585614e22565b91509150816000036145b5578681816145a8576145a8615d0b565b0495505050505050610e3c565b60008781038816906145c8848484614e52565b905060006145e4838b816145de576145de615d0b565b04614e8f565b919091029b9a5050505050505050505050565b60006146028361161a565b1561461857506001600160a01b03811631610841565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801561467a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c9190615e32565b8015806146af57506146af8461161a565b61237f5761237f6001600160a01b038516848484614eb0565b806000036146d557505050565b6146de8361161a565b15614719576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561237f573d6000803e3d6000fd5b610ad06001600160a01b0384168383614f61565b60606108416001600160a01b03831660145b6060600061474e836002615df9565b614759906002615a9a565b67ffffffffffffffff81111561477157614771615ae0565b6040519080825280601f01601f19166020018201604052801561479b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106147d2576147d261595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106148355761483561595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614871846002615df9565b61487c906001615a9a565b90505b6001811115614919577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106148bd576148bd61595a565b1a60f81b8282815181106148d3576148d361595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361491281615e4b565b905061487f565b508315610e3c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bf1565b60008181526001830160205260408120546149af57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610841565b506000610841565b60008181526001830160205260408120548015614aa05760006149db600183615c93565b85549091506000906149ef90600190615c93565b9050818114614a54576000866000018281548110614a0f57614a0f61595a565b9060005260206000200154905080876000018481548110614a3257614a3261595a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6557614a65615e62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610841565b6000915050610841565b600054610100900460ff166115235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b600054610100900460ff16614b805760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6115236107d061277b565b600054610100900460ff16614bf65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b61012d805461ffff19166001179055614c2f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614d3c565b6115237f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614faa565b600054610100900460ff16611ca25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b600054610100900460ff16614d2f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b610191805460ff19169055565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614d968585614de7565b9150915080198211614dab5781600101614328565b506002019392505050565b6000818311614dc55781610e3c565b5090919050565b60008180614ddc57614ddc615d0b565b838509949350505050565b6000806000614df68585614fb4565b9050848402808210614e0f579081900392509050614e1b565b60018183030393509150505b9250929050565b600080828410614e385750839050818303614e4a565b614e43600186615c93565b9150508183035b935093915050565b600080614e708380830381614e6957614e69615d0b565b0460010190565b9050828481614e8157614e81615d0b565b048186021795945050505050565b60006001815b60088110156133ac5783820260020382029150600101614e95565b6040516001600160a01b038085166024830152831660448201526064810182905261237f9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614fc3565b6040516001600160a01b038316602482015260448101829052610ad09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614efd565b610c048282612553565b60006000198284099392505050565b6000615018826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166150ab9092919063ffffffff16565b90508051600014806150395750808060200190518101906150399190615e78565b610ad05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bf1565b6060610b27848460008585600080866001600160a01b031685876040516150d29190615e9a565b60006040518083038185875af1925050503d806000811461510f576040519150601f19603f3d011682016040523d82523d6000602084013e615114565b606091505b509150915061512587838387615130565b979650505050505050565b6060831561519f578251600003615198576001600160a01b0385163b6151985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bf1565b5081610b27565b610b2783838151156151b45781518083602001fd5b8060405162461bcd60e51b8152600401610bf19190615dc6565b604051806040016040528060006001600160801b031681526020016151f16152bc565b905290565b60408051608081018252600080825260208201529081016152156152bc565b81526020016151f16152da565b8260028101928215615282579160200282015b8281111561528257825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190615235565b506143b092915061533e565b8260038101928215615282579160200282015b828111156152825782518255916020019190600101906152a1565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816152e95790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156143b0576000815560010161533f565b60006020828403121561536557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610e3c57600080fd5b6001600160a01b0381168114610c3b57600080fd5b60008083601f8401126153bc57600080fd5b50813567ffffffffffffffff8111156153d457600080fd5b6020830191508360208260061b8501011115614e1b57600080fd5b80356001600160801b038116811461540657600080fd5b919050565b60008060008060008060a0878903121561542457600080fd5b863561542f81615395565b9550602087013561543f81615395565b9450604087013567ffffffffffffffff81111561545b57600080fd5b61546789828a016153aa565b90955093505060608701359150615480608088016153ef565b90509295509295509295565b80610100810183101561084157600080fd5b600080600061022084860312156154b457600080fd5b833592506154c5856020860161548c565b91506154d585610120860161548c565b90509250925092565b6000602082840312156154f057600080fd5b5035919050565b6000806000806060858703121561550d57600080fd5b843561551881615395565b9350602085013561552881615395565b9250604085013567ffffffffffffffff81111561554457600080fd5b615550878288016153aa565b95989497509550505050565b6000806040838503121561556f57600080fd5b82359150602083013561558181615395565b809150509250929050565b6000806040838503121561559f57600080fd5b82356155aa81615395565b9150602083013561558181615395565b803563ffffffff8116811461540657600080fd5b6000806000606084860312156155e357600080fd5b83356155ee81615395565b925060208401356155fe81615395565b91506154d5604085016155ba565b60006020828403121561561e57600080fd5b610e3c826155ba565b8060005b600281101561237f5781516001600160a01b031684526020938401939091019060010161562b565b81516001600160801b0316815260208083015160608301916133ac90840182615627565b6000806020838503121561568a57600080fd5b823567ffffffffffffffff808211156156a257600080fd5b818501915085601f8301126156b657600080fd5b8135818111156156c557600080fd5b8660208285010111156156d757600080fd5b60209290920196919550909350505050565b600080604083850312156156fc57600080fd5b50508035926020909101359150565b60008060006060848603121561572057600080fd5b833561572b81615395565b925060208401359150604084013561574281615395565b809150509250925092565b8051825260206001600160a01b0381830151168184015260408201516157766040850182615627565b506060820151608080850160005b60028110156157e6576157d68285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615784565b50505050505050565b6101808101610841828461574d565b6000806000610140848603121561581457600080fd5b833561581f81615395565b9250602084013561582f81615395565b91506154d5856040860161548c565b6000806000806080858703121561585457600080fd5b843561585f81615395565b9350602085013561586f81615395565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156158c7576158b383855161574d565b9284019261018092909201916001016158a0565b50909695505050505050565b6000602082840312156158e557600080fd5b8135610e3c81615395565b602080825282518282018190526000919060409081850190868401855b8281101561593057615920848351615627565b928401929085019060010161590d565b5091979650505050505050565b60006020828403121561594f57600080fd5b8151610e3c81615395565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff8181168382160190808211156133ac576133ac615970565b6000602082840312156159b357600080fd5b610e3c826153ef565b6001600160801b038181168382160190808211156133ac576133ac615970565b6101208101615a2982866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b038281168282160390808211156133ac576133ac615970565b8082018082111561084157610841615970565b803567ffffffffffffffff8116811461540657600080fd5b600060208284031215615ad757600080fd5b610e3c82615aad565b634e487b7160e01b600052604160045260246000fd5b600060808284031215615b0857600080fd5b6040516080810181811067ffffffffffffffff82111715615b3957634e487b7160e01b600052604160045260246000fd5b604052615b45836153ef565b8152615b53602084016153ef565b6020820152615b6460408401615aad565b6040820152615b7560608401615aad565b60608201529392505050565b6001600160801b0380615b93836153ef565b16835280615ba3602084016153ef565b16602084015250615bb660408201615aad565b67ffffffffffffffff808216604085015280615bd460608501615aad565b16606085015250505050565b6101208101615bef8286615b81565b615a686080830185615b81565b8381526101208101615c4f60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610b27565b8181038181111561084157610841615970565b8381526101208101615cbb6020830185615b81565b610b2760a0830184615b81565b60006001600160801b03808316818103615ce457615ce4615970565b6001019392505050565b63ffffffff8281168282160390808211156133ac576133ac615970565b634e487b7160e01b600052601260045260246000fd5b60005b83811015615d3c578181015183820152602001615d24565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615d7d816017850160208801615d21565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615dba816028840160208801615d21565b01602801949350505050565b6020815260008251806020840152615de5816040850160208701615d21565b601f01601f19169190910160400192915050565b808202811582820484141761084157610841615970565b600082615e2d57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615e4457600080fd5b5051919050565b600081615e5a57615e5a615970565b506000190190565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615e8a57600080fd5b81518015158114610e3c57600080fd5b60008251615eac818460208701615d21565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106102855760003560e01c80638cd2403d11610153578063c9c65396116100cb578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461077c578063fcf66664146107a9578063ffb0a4a0146107c957600080fd5b8063f2bda26d14610749578063f727473a1461076957600080fd5b8063d547741f116100b0578063d547741f146106e7578063f06f8acd14610707578063f1c5e0141461073657600080fd5b8063c9c65396146106a7578063ca15c873146106c757600080fd5b80639ba372c211610122578063b76040cd11610107578063b76040cd14610631578063ba0a868b14610645578063bc88d7e41461067a57600080fd5b80639ba372c2146105fc578063a217fddf1461061c57600080fd5b80638cd2403d1461052b5780639010d07c1461054b57806391d148541461058357806393867fb5146105c957600080fd5b80633f4ba83a1161020157806369a4dea7116101b55780638456cb591161019a5780638456cb59146104c95780638672d545146104de578063873020371461050b57600080fd5b806369a4dea7146104945780638129fc1c146104b457600080fd5b806354fd4d50116101e657806354fd4d501461043857806355817d1d1461045b5780635c975abb1461047b57600080fd5b80633f4ba83a146103f057806341f435b31461040557600080fd5b80632ab2fad1116102585780632f2ff15d1161023d5780632f2ff15d14610390578063322cf844146103b057806336568abe146103d057600080fd5b80632ab2fad11461033d5780632c40de1b1461035d57600080fd5b806301ffc9a71461028a578063102ee9ba146102bf57806321589fa1146102ea578063248a9ca3146102ff575b600080fd5b34801561029657600080fd5b506102aa6102a5366004615353565b6107eb565b60405190151581526020015b60405180910390f35b6102d26102cd36600461540b565b610847565b6040516001600160801b0390911681526020016102b6565b6102fd6102f836600461549e565b610961565b005b34801561030b57600080fd5b5061032f61031a3660046154de565b600090815260c9602052604090206001015490565b6040519081526020016102b6565b34801561034957600080fd5b506102d26103583660046154f7565b610ad5565b34801561036957600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b1661032f565b34801561039c57600080fd5b506102fd6103ab36600461555c565b610b2f565b3480156103bc57600080fd5b5061032f6103cb36600461558c565b610b54565b3480156103dc57600080fd5b506102fd6103eb36600461555c565b610b77565b3480156103fc57600080fd5b506102fd610c08565b34801561041157600080fd5b507ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c084561032f565b34801561044457600080fd5b5060045b60405161ffff90911681526020016102b6565b34801561046757600080fd5b506102fd6104763660046155ce565b610c3e565b34801561048757600080fd5b506101915460ff166102aa565b3480156104a057600080fd5b506102fd6104af36600461560c565b610c91565b3480156104c057600080fd5b506102fd610cce565b3480156104d557600080fd5b506102fd610ded565b3480156104ea57600080fd5b506104fe6104f936600461558c565b610e20565b6040516102b69190615653565b34801561051757600080fd5b506102fd6105263660046154de565b610e43565b34801561053757600080fd5b506102fd610546366004615677565b610f5e565b34801561055757600080fd5b5061056b6105663660046156e9565b610fcb565b6040516001600160a01b0390911681526020016102b6565b34801561058f57600080fd5b506102aa61059e36600461555c565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156105d557600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509661032f565b34801561060857600080fd5b5061032f61061736600461570b565b610fe3565b34801561062857600080fd5b5061032f600081565b34801561063d57600080fd5b506001610448565b34801561065157600080fd5b5061066561066036600461558c565b611062565b60405163ffffffff90911681526020016102b6565b34801561068657600080fd5b5061069a6106953660046154de565b61107e565b6040516102b691906157ef565b3480156106b357600080fd5b506104fe6106c236600461558c565b6110c2565b3480156106d357600080fd5b5061032f6106e23660046154de565b611103565b3480156106f357600080fd5b506102fd61070236600461555c565b61111a565b34801561071357600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610665565b6102d261074436600461540b565b61113f565b34801561075557600080fd5b506102d26107643660046154f7565b6111f5565b61032f6107773660046157fe565b61124b565b34801561078857600080fd5b5061079c61079736600461583e565b61135f565b6040516102b69190615884565b3480156107b557600080fd5b5061032f6107c43660046158d3565b6113a5565b3480156107d557600080fd5b506107de6113ce565b6040516102b691906158f0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806108415750610841826113dd565b92915050565b6000610851611474565b6108596114cf565b610861611525565b61086e8787853486611587565b610880876001600160a01b031661161a565b156108c857816001600160801b03163410156108c8576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108d48888611641565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e08201529091506109458787836116e5565b60c00151915050610957600161015f55565b9695505050505050565b610969611474565b6109716114cf565b610979611525565b600061098d6109888560801c90565b611caa565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a19919061593d565b6001600160a01b0316336001600160a01b031614610a4a57604051634ca8886760e01b815260040160405180910390fd5b600034118015610a7657506020810151610a749060005b60200201516001600160a01b031661161a565b155b8015610a8f57506020810151610a8d906001610a61565b155b15610aad57604051631334bf4f60e11b815260040160405180910390fd5b610ab682611d82565b610ac4848484843334611f0e565b50610ad0600161015f55565b505050565b6000610ae18585612326565b6000610aed8686611641565b604080518082019091526001600160a01b038089168252871660208201529091506000610b1d8287878685612385565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610b4a81612549565b610ad08383612553565b6000610b608383612326565b6000610b6c8484611641565b9050610b2781612575565b6001600160a01b0381163314610bfa5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610c048282612597565b5050565b7ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845610c3381336125b9565b610c3b6125fc565b50565b610c687f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336125b9565b80610c728161264f565b6000610c7e8585611641565b9050610c8a8184612692565b5050505050565b610cbb7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336125b9565b80610cc58161264f565b610c048261277b565b600054610100900460ff1615808015610cee5750600054600160ff909116105b80610d085750303b158015610d08575060005460ff166001145b610d7a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf1565b6000805460ff191660011790558015610d9d576000805461ff0019166101001790555b610da5612831565b8015610c3b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b7ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845610e1881336125b9565b610c3b6128cc565b610e286151ce565b610e328383612326565b610e3c8383611641565b9392505050565b610e4b611474565b610e536114cf565b610e5b611525565b6000610e6a6109888360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610ed2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef6919061593d565b6001600160a01b0316336001600160a01b031614610f2757604051634ca8886760e01b815260040160405180910390fd5b610f52827f00000000000000000000000000000000000000000000000000000000000000008361290a565b50610c3b600161015f55565b61012d54600090610f749061ffff166001615986565b905061ffff8116600414610fb4576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610e3c9083612ac9565b6000610fed6114cf565b7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b1661101881336125b9565b8261102281612ad5565b8561102c81612ad5565b8561103681612b15565b61103e611474565b61104a33888a89612b4f565b9450611057600161015f55565b505050509392505050565b60008061106f8484611641565b9050610b278160000151612c03565b6110866151f6565b60006110956109888460801c90565b9050610e3c837f000000000000000000000000000000000000000000000000000000000000000083612c52565b6110ca6151ce565b6110d2611474565b6110da6114cf565b6110e2611525565b6110ec8383612326565b6110f68383612d53565b9050610841600161015f55565b600081815260fb6020526040812061084190612eb5565b600082815260c9602052604090206001015461113581612549565b610ad08383612597565b6000611149611474565b6111516114cf565b611159611525565b6111668787853486611587565b60006111728888611641565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e08101919091529091506111e38787836116e5565b60e00151915050610957600161015f55565b60006112018585612326565b600061120d8686611641565b604080518082019091526001600160a01b03808916825287166020820152909150600061123e828787866001612385565b5198975050505050505050565b6000611255611474565b61125d6114cf565b611265611525565b61126f8484612326565b60003411801561128e575061128c846001600160a01b031661161a565b155b80156112a957506112a7836001600160a01b031661161a565b155b156112c757604051631334bf4f60e11b815260040160405180910390fd5b6112d082611d82565b6112d86151ce565b6112e28585612ebf565b6112f7576112f08585612d53565b9050611304565b6113018585611641565b90505b604080518082019091526001600160a01b038087168252851660208201526113507f00000000000000000000000000000000000000000000000000000000000000008286853334612f22565b92505050610e3c600161015f55565b606061136b8585612326565b60006113778686611641565b90506109578185857f000000000000000000000000000000000000000000000000000000000000000061314f565b6000816113b181612ad5565b50506001600160a01b031660009081526068602052604090205490565b60606113d8613294565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061084157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610841565b600261015f54036114c75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bf1565b600261015f55565b6101915460ff16156115235760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610bf1565b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611523576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b428310156115c1576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115d3816001600160801b0316612b15565b6115dd8585612326565b6000821180156115fc57506115fa856001600160a01b031661161a565b155b15610c8a57604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610841565b6116496151ce565b6116538383612ebf565b611689576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061169584846133b3565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b60006117248260200151602001518360a001516020015160006002811061170e5761170e61595a565b60200201516001600160a01b0390811691161490565b905060005b83811015611a205760008585838181106117455761174561595a565b905060400201602001602081019061175d91906159a1565b905060008686848181106117735761177361595a565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116117a357505050505090506000806117c983613419565b915091506117e08960a0015160000151868861350d565b6000808215158a1515146117fa5783516020850151611802565b602084015184515b91509150600080611818848b8f604001516135a4565b91509150806001600160801b031684600001516001600160801b0316101561186c576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b0316845282518290849061188d9083906159bc565b6001600160801b03908116909152845160208601519082169116101590506118c05782516001600160801b031660208401525b60006118cc8787613680565b80518a55602080820151908a0151919250146118ed57602081015160018a01555b604080820151908901511461190757604081015160028a01555b8d60a00151602001518661191c57600161191f565b60005b60ff16600281106119325761193261595a565b60200201516001600160a01b03168e60a001516020015187611955576000611958565b60015b60ff166002811061196b5761196b61595a565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516119bc939291906159dc565b60405180910390a4828e60c0018181516119d691906159bc565b6001600160801b031690525060e08e0180518391906119f69083906159bc565b6001600160801b0316905250611a199a508b99506137ae98505050505050505050565b9050611729565b506000826040015115611aee576000611a458460c001518560a00151600001516137b4565b90508360c0015181611a579190615a7a565b6001600160801b0380831660c08701819052606087015192945091161015611aab576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b0385169290611ae2908490615a9a565b90915550611bac915050565b6000611b068460e001518560a00151600001516137eb565b9050808460e00151611b189190615a7a565b6001600160801b0380831660e08701819052606087015192945091161115611b6c576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b0385169290611ba5908490615a9a565b9091555050505b611bd783602001516000015184600001518560c001516001600160801b031686608001516000613825565b611bfb83602001516020015184600001518560e001516001600160801b031661394d565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611c9394939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611cb26151ce565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611cdb575050505050905060006001600160a01b031681600060028110611d1d57611d1d61595a565b60200201516001600160a01b031603611d62576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610c0457818160028110611da057611da061595a565b608002016000016020810190611db691906159a1565b6001600160801b0316828260028110611dd157611dd161595a565b608002016020016020810190611de791906159a1565b6001600160801b03161015611e28576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e6f828260028110611e3d57611e3d61595a565b608002016040016020810190611e539190615ac5565b67ffffffffffffffff166601000000000000908190041c151590565b611ea5576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ed0828260028110611eba57611eba61595a565b608002016060016020810190611e539190615ac5565b611f06576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611d85565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611f325750505050509050600080611f5883613419565b604080518082019091529193509150611fa8908a60026000835b82821015611f9e57611f8f60808302850136819003810190615af6565b81526020019060010190611f72565b5050505083613998565b611fde576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260009061202b908a600284835b828210156120215761201260808302850136819003810190615af6565b81526020019060010190611ff5565b5050505083613680565b805185519192501461203c57805185555b602080820151908501511461205657602081015160018601555b604080820151908501511461207057604081015160028601555b600061207c8984613af7565b905060005b60028110156122be57600082826002811061209e5761209e61595a565b602002015190508582600281106120b7576120b761595a565b6020020151516001600160801b03168c83600281106120d8576120d861595a565b6080020160000160208101906120ee91906159a1565b6001600160801b031610156121655760008c83600281106121115761211161595a565b60800201600001602081019061212791906159a1565b8784600281106121395761213961595a565b6020020151516121499190615a7a565b905061215f828c836001600160801b031661394d565b50612224565b8582600281106121775761217761595a565b6020020151516001600160801b03168c83600281106121985761219861595a565b6080020160000160208101906121ae91906159a1565b6001600160801b031611156122245760008683600281106121d1576121d161595a565b6020020151518d84600281106121e9576121e961595a565b6080020160000160208101906121ff91906159a1565b6122099190615a7a565b9050612222828c836001600160801b03168d6001613825565b505b6000891180156122415750612241816001600160a01b031661161a565b801561229d575085826002811061225a5761225a61595a565b6020020151516001600160801b03168c836002811061227b5761227b61595a565b60800201600001602081019061229191906159a1565b6001600160801b031611155b156122b5576122b56001600160a01b038b168a613b7a565b50600101612081565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d90612310908f906080820190600090615be0565b60405180910390a4505050505050505050505050565b8161233081612ad5565b8161233a81612ad5565b6001600160a01b038085169084160361237f576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006123ba8760200151856020015160006002811061170e5761170e61595a565b905060005b858110156124f95760008787838181106123db576123db61595a565b90506040020160200160208101906123f391906159a1565b905060008888848181106124095761240961595a565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b815481526020019060010190808311612439575050505050905060008061245f83613419565b915091506124728a60000151858761350d565b60008115158815151461248657825161248c565b60208301515b905060008061249c83898e6135a4565b91509150818b6000018181516124b291906159bc565b6001600160801b031690525060208b0180518291906124d29083906159bc565b6001600160801b03169052506124f297508896506137ae95505050505050565b90506123bf565b50821561251e578151845161250e91906137b4565b6001600160801b0316825261253f565b612530826020015185600001516137eb565b6001600160801b031660208301525b5095945050505050565b610c3b8133613c93565b61255d8282613d08565b600082815260fb60205260409020610ad09082613daa565b80516001600160801b03166000908152606760205260408120610e3c81612eb5565b6125a18282613dbf565b600082815260fb60205260409020610ad09082613e42565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457604051634ca8886760e01b815260040160405180910390fd5b612604613e57565b610191805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b620f424063ffffffff82161115610c3b576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff90811690821681036126c257505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161276e92919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff700100000000000000000000000000000000909104811690821681036127a7575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff1661289c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6128a4613eaa565b6128ac613f1d565b6128b4613f90565b6128bc61400b565b6128c461407e565b6115236140f1565b6128d46114cf565b610191805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126323390565b6000612917848484612c52565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916129639160040190815260200190565b600060405180830381600087803b15801561297d57600080fd5b505af1158015612991573d6000803e3d6000fd5b5050825160009081526066602052604081208181556001810182905560020155506129b99050565b805182516001600160801b031660009081526067602052604090206129dd916141f0565b5060408101515160208201516060830151612a0b92919060005b6020020151516001600160801b031661394d565b6040810151602090810151908201516060830151612a2c92919060016129f7565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b684600001518560600151600060028110612a9b57612a9b61595a565b6020020151606087015160016020020151604051612abb93929190615bfc565b60405180910390a450505050565b6000610e3c83836141fc565b6001600160a01b038116610c3b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610c3b576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038216600090815260686020526040812054808203612b79576000915050610b27565b80851115612b85578094505b612b8f8582615c93565b6001600160a01b038516600090815260686020526040902055612bb384848761394d565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff168015612c2e5780610e3c565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b612c5a6151f6565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc6919061593d565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612cec5750505050509050600080612d1283613419565b915091506000612d228783613af7565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612d5b6151ce565b612d658383612ebf565b15612d9c576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612da884846133b3565b603354909150600090612dc5906001600160801b031660016159bc565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612e0990836002615222565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b6000610841825490565b600080612ecc84846133b3565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612f18576000915050610841565b5060019392505050565b8451600090612f56908487845b608002016000016020810190612f4591906159a1565b6001600160801b0316856001613825565b6020860151612f689084876001612f2f565b606554600090612f82906001600160801b031660016159bc565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612fdd9082614226565b5087516020870151600091612ff391600161170e565b60408051808201909152909150613041908960026000835b828210156130375761302860808302850136819003810190615af6565b8152602001906001019061300b565b5050505082613680565b600083815260666020526040902061305a91600361528e565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b1580156130be57600080fd5b505af11580156130d2573d6000803e3d6000fd5b50505050886001600281106130e9576130e961595a565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d9061313a9087908e906080820190615ca6565b60405180910390a45098975050505050505050565b83516001600160801b0316600090815260676020526040812060609161317482612eb5565b905084158061318257508085115b1561318b578094505b848611156131c5576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006131d18787615c93565b905060008167ffffffffffffffff8111156131ee576131ee615ae0565b60405190808252806020026020018201604052801561322757816020015b6132146151f6565b81526020019060019003908161320c5790505b50905060005b8281101561328757600061324b613244838c615a9a565b8790612ac9565b905061325881898d612c52565b83838151811061326a5761326a61595a565b6020026020010181905250506132808160010190565b905061322d565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff8111156132be576132be615ae0565b6040519080825280602002602001820160405280156132f757816020015b6132e46152bc565b8152602001906001900390816132dc5790505b50905060005b826001600160801b0316816001600160801b031610156133ac57603560006133268360016159bc565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b0316815260019091019060200180831161335157505050505082826001600160801b03168151811061338e5761338e61595a565b602002602001018190525080806133a490615cc8565b9150506132fd565b5092915050565b6133bb6152bc565b816001600160a01b0316836001600160a01b0316106133f757604080518082019091526001600160a01b03808416825284166020820152610e3c565b50604080518082019091526001600160a01b0392831681529116602082015290565b6134216152da565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c16001886002600381106134c2576134c261595a565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166135218360801c90565b6001600160801b031614613561576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b0316600003610ad0576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b0316905060006135f7886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b90506000613625896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156136555761364b613646896001600160801b031686868686614232565b614331565b9550879450613674565b879550613671613646896001600160801b0316868686866143b4565b94505b50505050935093915050565b613688615320565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff0000000000000000000000000000000016911617919091179082015290810183613731576000613753565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b6000806137c083612c03565b9050610b276136466001600160801b038616620f42406137e08582615cee565b63ffffffff1661449b565b6000806137f783612c03565b9050610b276136466001600160801b03861661381684620f4240615cee565b63ffffffff16620f4240614503565b613837856001600160a01b031661161a565b156138a05782821015613876576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561389b5761389b61388b8484615c93565b6001600160a01b03861690613b7a565b610c8a565b8215610c8a5780156139385760006138c16001600160a01b038716306145f7565b90506138d86001600160a01b03871686308761469e565b60006138ed6001600160a01b038816306145f7565b9050846138fa8383615c93565b14613931576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610c8a565b610c8a6001600160a01b03861685308661469e565b8060000361395a57505050565b61396c836001600160a01b031661161a565b1561398457610ad06001600160a01b03831682613b7a565b610ad06001600160a01b03841683836146c8565b6000805b6002811015612f18578281600281106139b7576139b761595a565b6020020151516001600160801b03168482600281106139d8576139d861595a565b6020020151516001600160801b0316141580613a3a5750828160028110613a0157613a0161595a565b6020020151602001516001600160801b0316848260028110613a2557613a2561595a565b6020020151602001516001600160801b031614155b80613a8d5750828160028110613a5257613a5261595a565b60200201516040015167ffffffffffffffff16848260028110613a7757613a7761595a565b60200201516040015167ffffffffffffffff1614155b80613ae05750828160028110613aa557613aa561595a565b60200201516060015167ffffffffffffffff16848260028110613aca57613aca61595a565b60200201516060015167ffffffffffffffff1614155b15613aef576000915050610841565b60010161399c565b613aff6152bc565b81613b0e578260200151610e3c565b60405180604001604052808460200151600160028110613b3057613b3061595a565b60200201516001600160a01b03166001600160a01b031681526020018460200151600060028110613b6357613b6361595a565b60200201516001600160a01b031690529392505050565b80471015613bca5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bf1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613c17576040519150601f19603f3d011682016040523d82523d6000602084013e613c1c565b606091505b5050905080610ad05760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bf1565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457613cc68161472d565b613cd183602061473f565b604051602001613ce2929190615d45565b60408051601f198184030181529082905262461bcd60e51b8252610bf191600401615dc6565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610c0457600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613d663390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e3c836001600160a01b038416614968565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610c0457600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e3c836001600160a01b0384166149b7565b6101915460ff166115235760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bf1565b600054610100900460ff16613f155760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614aaa565b600054610100900460ff16613f885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614b15565b600054610100900460ff16613ffb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b614003614aaa565b611523614b8b565b600054610100900460ff166140765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614c59565b600054610100900460ff166140e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b611523614cc4565b600054610100900460ff1661415c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6141a67ff28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c08457f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096614d3c565b6115237f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096614d3c565b6000610e3c83836149b7565b60008260000182815481106142135761421361595a565b9060005260206000200154905092915050565b6000610e3c8383614968565b6000826000036142a15781600003614276576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61429a8661428b660100000000000080615df9565b6142958580615df9565b61449b565b9050614328565b660100000000000084028584028386020160006142be868a615df9565b6142c89083615c93565b905060006142d68485614d87565b905060006142e48484614d87565b905060006142f28383614db6565b9050600061430187888461449b565b90506000614310878785614503565b905061431d8e838361449b565b985050505050505050505b95945050505050565b60006001600160801b038211156143b05760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610bf1565b5090565b60008260000361441c57816000036143f8576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61429a866144068480615df9565b614417660100000000000080615df9565b614503565b660100000000000084028584028386020160006144398983615df9565b905060006144478485614d87565b905060006144558389614d87565b905060006144638383614db6565b9050600061447287888461449b565b90506000614481868c8561449b565b905061431d876144918589615e10565b6144178486615a9a565b6000806144a9858585614503565b905060006144b8868686614dcc565b1115610b275760001981106144f9576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610e3c565b60008060006145128686614de7565b91509150816000036145375783818161452d5761452d615d0b565b0492505050610e3c565b838210614570576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061457d878787614dcc565b905060008061458d858585614e22565b91509150816000036145b5578681816145a8576145a8615d0b565b0495505050505050610e3c565b60008781038816906145c8848484614e52565b905060006145e4838b816145de576145de615d0b565b04614e8f565b919091029b9a5050505050505050505050565b60006146028361161a565b1561461857506001600160a01b03811631610841565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa15801561467a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c9190615e32565b8015806146af57506146af8461161a565b61237f5761237f6001600160a01b038516848484614eb0565b806000036146d557505050565b6146de8361161a565b15614719576040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561237f573d6000803e3d6000fd5b610ad06001600160a01b0384168383614f61565b60606108416001600160a01b03831660145b6060600061474e836002615df9565b614759906002615a9a565b67ffffffffffffffff81111561477157614771615ae0565b6040519080825280601f01601f19166020018201604052801561479b576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106147d2576147d261595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106148355761483561595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614871846002615df9565b61487c906001615a9a565b90505b6001811115614919577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106148bd576148bd61595a565b1a60f81b8282815181106148d3576148d361595a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361491281615e4b565b905061487f565b508315610e3c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bf1565b60008181526001830160205260408120546149af57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610841565b506000610841565b60008181526001830160205260408120548015614aa05760006149db600183615c93565b85549091506000906149ef90600190615c93565b9050818114614a54576000866000018281548110614a0f57614a0f61595a565b9060005260206000200154905080876000018481548110614a3257614a3261595a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a6557614a65615e62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610841565b6000915050610841565b600054610100900460ff166115235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b600054610100900460ff16614b805760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b6115236107d061277b565b600054610100900460ff16614bf65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b61012d805461ffff19166001179055614c2f7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680614d3c565b6115237f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614faa565b600054610100900460ff16611ca25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b600054610100900460ff16614d2f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bf1565b610191805460ff19169055565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614d968585614de7565b9150915080198211614dab5781600101614328565b506002019392505050565b6000818311614dc55781610e3c565b5090919050565b60008180614ddc57614ddc615d0b565b838509949350505050565b6000806000614df68585614fb4565b9050848402808210614e0f579081900392509050614e1b565b60018183030393509150505b9250929050565b600080828410614e385750839050818303614e4a565b614e43600186615c93565b9150508183035b935093915050565b600080614e708380830381614e6957614e69615d0b565b0460010190565b9050828481614e8157614e81615d0b565b048186021795945050505050565b60006001815b60088110156133ac5783820260020382029150600101614e95565b6040516001600160a01b038085166024830152831660448201526064810182905261237f9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614fc3565b6040516001600160a01b038316602482015260448101829052610ad09084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614efd565b610c048282612553565b60006000198284099392505050565b6000615018826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166150ab9092919063ffffffff16565b90508051600014806150395750808060200190518101906150399190615e78565b610ad05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bf1565b6060610b27848460008585600080866001600160a01b031685876040516150d29190615e9a565b60006040518083038185875af1925050503d806000811461510f576040519150601f19603f3d011682016040523d82523d6000602084013e615114565b606091505b509150915061512587838387615130565b979650505050505050565b6060831561519f578251600003615198576001600160a01b0385163b6151985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bf1565b5081610b27565b610b2783838151156151b45781518083602001fd5b8060405162461bcd60e51b8152600401610bf19190615dc6565b604051806040016040528060006001600160801b031681526020016151f16152bc565b905290565b60408051608081018252600080825260208201529081016152156152bc565b81526020016151f16152da565b8260028101928215615282579160200282015b8281111561528257825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190615235565b506143b092915061533e565b8260038101928215615282579160200282015b828111156152825782518255916020019190600101906152a1565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816152e95790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156143b0576000815560010161533f565b60006020828403121561536557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610e3c57600080fd5b6001600160a01b0381168114610c3b57600080fd5b60008083601f8401126153bc57600080fd5b50813567ffffffffffffffff8111156153d457600080fd5b6020830191508360208260061b8501011115614e1b57600080fd5b80356001600160801b038116811461540657600080fd5b919050565b60008060008060008060a0878903121561542457600080fd5b863561542f81615395565b9550602087013561543f81615395565b9450604087013567ffffffffffffffff81111561545b57600080fd5b61546789828a016153aa565b90955093505060608701359150615480608088016153ef565b90509295509295509295565b80610100810183101561084157600080fd5b600080600061022084860312156154b457600080fd5b833592506154c5856020860161548c565b91506154d585610120860161548c565b90509250925092565b6000602082840312156154f057600080fd5b5035919050565b6000806000806060858703121561550d57600080fd5b843561551881615395565b9350602085013561552881615395565b9250604085013567ffffffffffffffff81111561554457600080fd5b615550878288016153aa565b95989497509550505050565b6000806040838503121561556f57600080fd5b82359150602083013561558181615395565b809150509250929050565b6000806040838503121561559f57600080fd5b82356155aa81615395565b9150602083013561558181615395565b803563ffffffff8116811461540657600080fd5b6000806000606084860312156155e357600080fd5b83356155ee81615395565b925060208401356155fe81615395565b91506154d5604085016155ba565b60006020828403121561561e57600080fd5b610e3c826155ba565b8060005b600281101561237f5781516001600160a01b031684526020938401939091019060010161562b565b81516001600160801b0316815260208083015160608301916133ac90840182615627565b6000806020838503121561568a57600080fd5b823567ffffffffffffffff808211156156a257600080fd5b818501915085601f8301126156b657600080fd5b8135818111156156c557600080fd5b8660208285010111156156d757600080fd5b60209290920196919550909350505050565b600080604083850312156156fc57600080fd5b50508035926020909101359150565b60008060006060848603121561572057600080fd5b833561572b81615395565b925060208401359150604084013561574281615395565b809150509250925092565b8051825260206001600160a01b0381830151168184015260408201516157766040850182615627565b506060820151608080850160005b60028110156157e6576157d68285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615784565b50505050505050565b6101808101610841828461574d565b6000806000610140848603121561581457600080fd5b833561581f81615395565b9250602084013561582f81615395565b91506154d5856040860161548c565b6000806000806080858703121561585457600080fd5b843561585f81615395565b9350602085013561586f81615395565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156158c7576158b383855161574d565b9284019261018092909201916001016158a0565b50909695505050505050565b6000602082840312156158e557600080fd5b8135610e3c81615395565b602080825282518282018190526000919060409081850190868401855b8281101561593057615920848351615627565b928401929085019060010161590d565b5091979650505050505050565b60006020828403121561594f57600080fd5b8151610e3c81615395565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff8181168382160190808211156133ac576133ac615970565b6000602082840312156159b357600080fd5b610e3c826153ef565b6001600160801b038181168382160190808211156133ac576133ac615970565b6101208101615a2982866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b038281168282160390808211156133ac576133ac615970565b8082018082111561084157610841615970565b803567ffffffffffffffff8116811461540657600080fd5b600060208284031215615ad757600080fd5b610e3c82615aad565b634e487b7160e01b600052604160045260246000fd5b600060808284031215615b0857600080fd5b6040516080810181811067ffffffffffffffff82111715615b3957634e487b7160e01b600052604160045260246000fd5b604052615b45836153ef565b8152615b53602084016153ef565b6020820152615b6460408401615aad565b6040820152615b7560608401615aad565b60608201529392505050565b6001600160801b0380615b93836153ef565b16835280615ba3602084016153ef565b16602084015250615bb660408201615aad565b67ffffffffffffffff808216604085015280615bd460608501615aad565b16606085015250505050565b6101208101615bef8286615b81565b615a686080830185615b81565b8381526101208101615c4f60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610b27565b8181038181111561084157610841615970565b8381526101208101615cbb6020830185615b81565b610b2760a0830184615b81565b60006001600160801b03808316818103615ce457615ce4615970565b6001019392505050565b63ffffffff8281168282160390808211156133ac576133ac615970565b634e487b7160e01b600052601260045260246000fd5b60005b83811015615d3c578181015183820152602001615d24565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615d7d816017850160208801615d21565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615dba816028840160208801615d21565b01602801949350505050565b6020815260008251806020840152615de5816040850160208701615d21565b601f01601f19169190910160400192915050565b808202811582820484141761084157610841615970565b600082615e2d57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615e4457600080fd5b5051919050565b600081615e5a57615e5a615970565b506000190190565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615e8a57600080fd5b81518015158114610e3c57600080fd5b60008251615eac818460208701615d21565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "details": "Carbon Controller contract", - "events": { - "FeesWithdrawn(address,address,uint256,address)": { - "details": "triggered when fees are withdrawn" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PairCreated(uint128,address,address)": { - "details": "triggered when a new pair is created" - }, - "PairTradingFeePPMUpdated(address,address,uint32,uint32)": { - "details": "triggered when the custom trading fee for a given pair is updated" - }, - "Paused(address)": { - "details": "Emitted when the pause is triggered by `account`." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is created" - }, - "StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is deleted" - }, - "StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)": { - "details": "triggered when a strategy is updated" - }, - "TokensTraded(address,address,address,uint256,uint256,uint128,bool)": { - "details": "triggered when tokens are traded" - }, - "TradingFeePPMUpdated(uint32,uint32)": { - "details": "triggered when the network fee is updated" - }, - "Unpaused(address)": { - "details": "Emitted when the pause is lifted by `account`." - } - }, - "kind": "dev", - "methods": { - "accumulatedFees(address)": { - "details": "returns the amount of fees accumulated for the specified token" - }, - "calculateTradeSourceAmount(address,address,(uint256,uint128)[])": { - "details": "returns the source amount required when trading by target amount" - }, - "calculateTradeTargetAmount(address,address,(uint256,uint128)[])": { - "details": "returns the target amount expected when trading by source amount" - }, - "constructor": { - "details": "used to set immutable state variables and initialize the implementation" - }, - "controllerType()": { - "details": "returns the type of the controller" - }, - "createPair(address,address)": { - "details": "creates a new pair of provided token0 and token1" - }, - "createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])": { - "details": "creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any" - }, - "deleteStrategy(uint256)": { - "details": "deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "pair(address,address)": { - "details": "returns a pair's metadata matching the provided token0 and token1" - }, - "pairTradingFeePPM(address,address)": { - "details": "returns the trading fee for a given pair (in units of PPM)" - }, - "pairs()": { - "details": "returns a list of all supported pairs" - }, - "pause()": { - "details": "pauses the CarbonController requirements: - the caller must have the ROLE_EMERGENCY_STOPPER privilege" - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "roleEmergencyStopper()": { - "details": "returns the emergency stopper role" - }, - "roleFeesManager()": { - "details": "returns the fees manager role" - }, - "setPairTradingFeePPM(address,address,uint32)": { - "details": "sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "setTradingFeePPM(uint32)": { - "details": "sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "strategiesByPair(address,address,uint256,uint256)": { - "details": "returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex" - }, - "strategiesByPairCount(address,address)": { - "details": "returns the count of strategies belonging to a specific pair" - }, - "strategy(uint256)": { - "details": "returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradingFeePPM()": { - "details": "returns the trading fee (in units of PPM)" - }, - "unpause()": { - "details": "resumes the CarbonController requirements: - the caller must have the ROLE_EMERGENCY_STOPPER privilege" - }, - "updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])": { - "details": "updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any" - }, - "withdrawFees(address,uint256,address)": { - "details": "transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2445, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 12406, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_lastPairId", - "offset": 0, - "slot": "51", - "type": "t_uint128" - }, - { - "astId": 12414, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairIds", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_userDefinedValueType(Token)16997,t_mapping(t_userDefinedValueType(Token)16997,t_uint128))" - }, - { - "astId": 12421, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairsStorage", - "offset": 0, - "slot": "53", - "type": "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)16997)2_storage)" - }, - { - "astId": 12427, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "54", - "type": "t_array(t_uint256)47_storage" - }, - { - "astId": 12898, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyCounter", - "offset": 0, - "slot": "101", - "type": "t_uint128" - }, - { - "astId": 12900, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_tradingFeePPM", - "offset": 16, - "slot": "101", - "type": "t_uint32" - }, - { - "astId": 12906, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_packedOrdersByStrategyId", - "offset": 0, - "slot": "102", - "type": "t_mapping(t_uint256,t_array(t_uint256)3_storage)" - }, - { - "astId": 12911, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyIdsByPairIdStorage", - "offset": 0, - "slot": "103", - "type": "t_mapping(t_uint128,t_struct(UintSet)5726_storage)" - }, - { - "astId": 12916, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_accumulatedFees", - "offset": 0, - "slot": "104", - "type": "t_mapping(t_userDefinedValueType(Token)16997,t_uint256)" - }, - { - "astId": 12920, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_customTradingFeePPM", - "offset": 0, - "slot": "105", - "type": "t_mapping(t_uint128,t_uint32)" - }, - { - "astId": 12926, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "106", - "type": "t_array(t_uint256)45_storage" - }, - { - "astId": 2718, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "151", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roles", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roleMembers", - "offset": 0, - "slot": "251", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)" - }, - { - "astId": 143, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 17877, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializations", - "offset": 0, - "slot": "301", - "type": "t_uint16" - }, - { - "astId": 17883, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "302", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 891, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_status", - "offset": 0, - "slot": "351", - "type": "t_uint256" - }, - { - "astId": 960, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "352", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 771, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_paused", - "offset": 0, - "slot": "401", - "type": "t_bool" - }, - { - "astId": 876, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "402", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 11368, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "451", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)3_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[3]", - "numberOfBytes": "96" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)47_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[47]", - "numberOfBytes": "1504" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_array(t_userDefinedValueType(Token)16997)2_storage": { - "base": "t_userDefinedValueType(Token)16997", - "encoding": "inplace", - "label": "Token[2]", - "numberOfBytes": "64" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)5569_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)16997)2_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => Token[2])", - "numberOfBytes": "32", - "value": "t_array(t_userDefinedValueType(Token)16997)2_storage" - }, - "t_mapping(t_uint128,t_struct(UintSet)5726_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => struct EnumerableSetUpgradeable.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)5726_storage" - }, - "t_mapping(t_uint128,t_uint32)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => uint32)", - "numberOfBytes": "32", - "value": "t_uint32" - }, - "t_mapping(t_uint256,t_array(t_uint256)3_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256[3])", - "numberOfBytes": "32", - "value": "t_array(t_uint256)3_storage" - }, - "t_mapping(t_userDefinedValueType(Token)16997,t_mapping(t_userDefinedValueType(Token)16997,t_uint128))": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)16997", - "label": "mapping(Token => mapping(Token => uint128))", - "numberOfBytes": "32", - "value": "t_mapping(t_userDefinedValueType(Token)16997,t_uint128)" - }, - "t_mapping(t_userDefinedValueType(Token)16997,t_uint128)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)16997", - "label": "mapping(Token => uint128)", - "numberOfBytes": "32", - "value": "t_uint128" - }, - "t_mapping(t_userDefinedValueType(Token)16997,t_uint256)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)16997", - "label": "mapping(Token => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)5569_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 5568, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)5254_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)5254_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 5249, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 5253, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)5726_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.UintSet", - "members": [ - { - "astId": 5725, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)5254_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_userDefinedValueType(Token)16997": { - "encoding": "inplace", - "label": "Token", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonController_Proxy.json b/src/contracts/ethereum/CarbonController_Proxy.json deleted file mode 100644 index 6854646..0000000 --- a/src/contracts/ethereum/CarbonController_Proxy.json +++ /dev/null @@ -1,303 +0,0 @@ -{ - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "transactionIndex": 151, - "gasUsed": "883617", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000600000020000000000000000000000080000000000000000000200004000004000000008080000008000000000200000000000000000000140000000000000040000000000000000000000a0000000000000800008000000000400000000000000000400000040000000000000001000000000000000000020000000000000000000040004000000000400000100200000000020000080200000000000000000020000000000000000000000000000100000000020", - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142", - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "logs": [ - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000006db6ee351fc802833ed2f28a25bbbf971d8b12c1" - ], - "data": "0x", - "logIndex": 248, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 249, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 250, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 251, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0xf28f409b8cbe6b50c7ca45afe893f01f69626f8a4e33cb480bc1bc2d618c0845", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 252, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 253, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 254, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - }, - { - "transactionIndex": 151, - "blockNumber": 17087375, - "transactionHash": "0xa8c33dd6939277c3dae2307d5ccf98fa35d2f727cb4f0d95111089615775b77e", - "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 255, - "blockHash": "0xd5388c654c89b28b576a4fd999fc27238c95f45777237ed163986a8a50343142" - } - ], - "blockNumber": 17087375, - "cumulativeGasUsed": "10747163", - "status": 1, - "byzantium": true - }, - "args": [ - "0x6Db6EE351fc802833ed2f28A25BBBF971D8b12C1", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonPOL.json b/src/contracts/ethereum/CarbonPOL.json deleted file mode 100644 index 54396fc..0000000 --- a/src/contracts/ethereum/CarbonPOL.json +++ /dev/null @@ -1,1128 +0,0 @@ -{ - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientAmountForTrading", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenSent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPrice", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTrade", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "TradingDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "prevEthSaleAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "newEthSaleAmount", - "type": "uint128" - } - ], - "name": "EthSaleAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevMarketPriceMultiply", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newMarketPriceMultiply", - "type": "uint32" - } - ], - "name": "MarketPriceMultiplyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "prevMinEthSaleAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "newMinEthSaleAmount", - "type": "uint128" - } - ], - "name": "MinEthSaleAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevPriceDecayHalfLife", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newPriceDecayHalfLife", - "type": "uint32" - } - ], - "name": "PriceDecayHalfLifeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "indexed": false, - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "PriceUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "TokenTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "indexed": false, - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "TradingEnabled", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "amountAvailableForTrading", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "enableTrading", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "enableTradingETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethSaleAmount", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "initial", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "current", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.EthSaleAmount", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "expectedTradeInput", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - } - ], - "name": "expectedTradeReturn", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "marketPriceMultiply", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minEthSaleAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "priceDecayHalfLife", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newEthSaleAmount", - "type": "uint128" - } - ], - "name": "setEthSaleAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newMarketPriceMultiply", - "type": "uint32" - } - ], - "name": "setMarketPriceMultiply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newMinEthSaleAmount", - "type": "uint128" - } - ], - "name": "setMinEthSaleAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newPriceDecayHalfLife", - "type": "uint32" - } - ], - "name": "setPriceDecayHalfLife", - "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": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "tokenPrice", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "trade", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "tradingEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "transactionIndex": 55, - "gasUsed": "833913", - "logsBloom": "0x000000040000000008000002000000004800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000200000020000001000800000000000080000200000080000000200004000000000000008000000008000000000000000010000000000000100000000000000000000000000000000000000a0000000008000800008000000000000000080000000000400000000010000000400001000000000000000000020000000000000000000040000000000000400000120000000000020000000000000000000000000020000000000000000000000000000000000000000", - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a", - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "logs": [ - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000945ac60e655a84b6638216521b391ae984287105" - ], - "data": "0x", - "logIndex": 114, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 115, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 116, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b0" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 117, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", - "logIndex": 118, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 119, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 120, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - } - ], - "blockNumber": 18120670, - "cumulativeGasUsed": "5635680", - "status": 1, - "byzantium": true - }, - "args": [ - "0x945ac60e655a84b6638216521b391ae984287105", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 2, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "postUpgrade", - "args": [ - "0x" - ] - }, - "implementation": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonPOL_Implementation.json b/src/contracts/ethereum/CarbonPOL_Implementation.json deleted file mode 100644 index d04aab3..0000000 --- a/src/contracts/ethereum/CarbonPOL_Implementation.json +++ /dev/null @@ -1,1481 +0,0 @@ -{ - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "abi": [ - { - "inputs": [ - { - "internalType": "Token", - "name": "initBnt", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientAmountForTrading", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenSent", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPrice", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTrade", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "TradingDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "prevEthSaleAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "newEthSaleAmount", - "type": "uint128" - } - ], - "name": "EthSaleAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevMarketPriceMultiply", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newMarketPriceMultiply", - "type": "uint32" - } - ], - "name": "MarketPriceMultiplyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "prevMinEthSaleAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "newMinEthSaleAmount", - "type": "uint128" - } - ], - "name": "MinEthSaleAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevPriceDecayHalfLife", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newPriceDecayHalfLife", - "type": "uint32" - } - ], - "name": "PriceDecayHalfLifeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "indexed": false, - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "PriceUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "TokenTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "indexed": false, - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "TradingEnabled", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "amountAvailableForTrading", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "enableTrading", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "price", - "type": "tuple" - } - ], - "name": "enableTradingETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethSaleAmount", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "initial", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "current", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.EthSaleAmount", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "expectedTradeInput", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - } - ], - "name": "expectedTradeReturn", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "marketPriceMultiply", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minEthSaleAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "priceDecayHalfLife", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newEthSaleAmount", - "type": "uint128" - } - ], - "name": "setEthSaleAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newMarketPriceMultiply", - "type": "uint32" - } - ], - "name": "setMarketPriceMultiply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newMinEthSaleAmount", - "type": "uint128" - } - ], - "name": "setMinEthSaleAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newPriceDecayHalfLife", - "type": "uint32" - } - ], - "name": "setPriceDecayHalfLife", - "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": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "tokenPrice", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "sourceAmount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "internalType": "struct ICarbonPOL.Price", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint128", - "name": "targetAmount", - "type": "uint128" - } - ], - "name": "trade", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "tradingEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "transactionIndex": 230, - "gasUsed": "3226574", - "logsBloom": "0x0000000400000000080000000000000008000000000000000000000000000000000000000000000000000000000001000000000000000000000800000000000000000000000000000000002000000000000001000000000000000800000000000800000002000040000000000000080000001000000800000000000100000000000001000000000000000000c0000000000000040000a0000000008000000008000000000000000080000000000400000000000000000400001000000000000000000000000000000000000000040000000000000000000120000000000020000000000000000000000000020000000000000000000000000000000000000000", - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a", - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "logs": [ - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 488, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 489, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0x04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b0" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 490, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", - "logIndex": 491, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0x85e15b0826727feb528c06e9d1eec6c462de224bbb5b7c737824ae09ea83a7bc" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056bc75e2d63100000", - "logIndex": 492, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0xab3e74195d9db5b0262eea6c76eda46ba8bb5aed6f36164adbce526d219596d1" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e80000", - "logIndex": 493, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - }, - { - "transactionIndex": 230, - "blockNumber": 18762285, - "transactionHash": "0xf1073958362c4e313ee39607bbf4e277ec51bc06bb43272e76d874353b49ad75", - "address": "0x779b3BEa233EBC5947C5fF0FFd7F4F90654Ab123", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 494, - "blockHash": "0xabfce8938442d6785640d9d174ebfc444b71e1e9a304a7b19d09ea24c16a864a" - } - ], - "blockNumber": 18762285, - "cumulativeGasUsed": "28076978", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C" - ], - "numDeployments": 2, - "solcInputHash": "7537aaf0700eead140dc8b683c41b53d", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"initBnt\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmountForTrading\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenSent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrade\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TradingDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevEthSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newEthSaleAmount\",\"type\":\"uint128\"}],\"name\":\"EthSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevMarketPriceMultiply\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newMarketPriceMultiply\",\"type\":\"uint32\"}],\"name\":\"MarketPriceMultiplyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"prevMinEthSaleAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newMinEthSaleAmount\",\"type\":\"uint128\"}],\"name\":\"MinEthSaleAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevPriceDecayHalfLife\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"PriceDecayHalfLifeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonPOL.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"PriceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"TokenTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"struct ICarbonPOL.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"TradingEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"amountAvailableForTrading\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonPOL.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"enableTrading\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonPOL.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"name\":\"enableTradingETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ethSaleAmount\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"initial\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"current\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonPOL.EthSaleAmount\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeInput\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"}],\"name\":\"expectedTradeReturn\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketPriceMultiply\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minEthSaleAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceDecayHalfLife\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newEthSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setEthSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newMarketPriceMultiply\",\"type\":\"uint32\"}],\"name\":\"setMarketPriceMultiply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMinEthSaleAmount\",\"type\":\"uint128\"}],\"name\":\"setMinEthSaleAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newPriceDecayHalfLife\",\"type\":\"uint32\"}],\"name\":\"setPriceDecayHalfLife\",\"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\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tokenPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sourceAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"internalType\":\"struct ICarbonPOL.Price\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"targetAmount\",\"type\":\"uint128\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tradingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"used to initialize the implementation\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"events\":{\"EthSaleAmountUpdated(uint128,uint128)\":{\"notice\":\"triggered when the eth sale amount is updated\"},\"MarketPriceMultiplyUpdated(uint32,uint32)\":{\"notice\":\"triggered when the market price multiplier is updated\"},\"MinEthSaleAmountUpdated(uint128,uint128)\":{\"notice\":\"triggered when the min eth sale amount is updated\"},\"PriceDecayHalfLifeUpdated(uint32,uint32)\":{\"notice\":\"triggered when the price decay halflife is updated\"},\"PriceUpdated(address,(uint128,uint128))\":{\"notice\":\"triggered after an eth trade leaves less than 10% of the initial eth sale amount\"},\"TokenTraded(address,address,uint128,uint128)\":{\"notice\":\"triggered after a successful trade is executed\"},\"TradingEnabled(address,(uint128,uint128))\":{\"notice\":\"triggered when trading is enabled for a token\"}},\"kind\":\"user\",\"methods\":{\"amountAvailableForTrading(address)\":{\"notice\":\"returns the amount available for trading for the token\"},\"enableTrading(address,(uint128,uint128))\":{\"notice\":\"enable trading for TKN->ETH and set the initial price requirements: - the caller must be the admin of the contract - can only enable trading for non-native tokens\"},\"enableTradingETH((uint128,uint128))\":{\"notice\":\"enable trading for ETH->BNT and set the initial price requirements: - the caller must be the admin of the contract\"},\"ethSaleAmount()\":{\"notice\":\"returns the initial and current eth sale amount\"},\"expectedTradeInput(address,uint128)\":{\"notice\":\"returns the source amount required given a target amount\"},\"expectedTradeReturn(address,uint128)\":{\"notice\":\"returns the target amount expected given a source amount\"},\"marketPriceMultiply()\":{\"notice\":\"returns the market price multiplier\"},\"minEthSaleAmount()\":{\"notice\":\"returns the min eth sale amount - resets the current eth sale amount if below this amount after a trade\"},\"priceDecayHalfLife()\":{\"notice\":\"returns the price decay half-life according to the exp decay formula\"},\"setEthSaleAmount(uint128)\":{\"notice\":\"sets the eth sale amount requirements: - the caller must be the admin of the contract\"},\"setMarketPriceMultiply(uint32)\":{\"notice\":\"sets the market price multiply requirements: - the caller must be the admin of the contract\"},\"setMinEthSaleAmount(uint128)\":{\"notice\":\"sets the min eth sale amount requirements: - the caller must be the admin of the contract\"},\"setPriceDecayHalfLife(uint32)\":{\"notice\":\"sets the price decay half-life requirements: - the caller must be the admin of the contract\"},\"tokenPrice(address)\":{\"notice\":\"returns the current token price (ETH / TKN)if token == ETH, returns BNT / ETH price\"},\"trade(address,uint128)\":{\"notice\":\"trades ETH for *targetAmount* of token based on the current token price (trade by target amount)if token == ETH, trades BNT for amount of ETH\"},\"tradingEnabled(address)\":{\"notice\":\"returns true if trading is enabled for token\"}},\"notice\":\"CarbonPOL contract\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/pol/CarbonPOL.sol\":\"CarbonPOL\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"contracts/pol/CarbonPOL.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { ICarbonPOL } from \\\"./interfaces/ICarbonPOL.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Token, NATIVE_TOKEN } from \\\"../token/Token.sol\\\";\\nimport { Utils } from \\\"../utility/Utils.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { ExpDecayMath } from \\\"../utility/ExpDecayMath.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @notice CarbonPOL contract\\n */\\ncontract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils {\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n // bnt token address\\n Token private immutable _bnt;\\n\\n // initial starting price multiplier for the dutch auction\\n uint32 private _marketPriceMultiply;\\n\\n // time until the price gets back to market price\\n uint32 private _priceDecayHalfLife;\\n\\n // token to trading start time mapping\\n mapping(Token token => uint32 tradingStartTime) private _tradingStartTimes;\\n\\n // token to initial price mapping\\n mapping(Token token => Price initialPrice) private _initialPrice;\\n\\n // initial and current eth sale amount - for ETH->BNT trades\\n EthSaleAmount private _ethSaleAmount;\\n\\n // min eth sale amount - resets the current eth sale amount if below this amount after a trade\\n uint128 private _minEthSaleAmount;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev used to initialize the implementation\\n */\\n constructor(Token initBnt) {\\n _validAddress(Token.unwrap(initBnt));\\n _bnt = initBnt;\\n // initialize implementation\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonPOL_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonPOL_init() internal onlyInitializing {\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonPOL_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonPOL_init_unchained() internal onlyInitializing {\\n // set market price multiplier to 2x\\n _setMarketPriceMultiply(2);\\n // set price decay half-life to 10 days\\n _setPriceDecayHalfLife(10 days);\\n // set initial eth sale amount to 100 eth\\n _setEthSaleAmount(100 ether);\\n // set min eth sale amount to 10 eth\\n _setMinEthSaleAmount(10 ether);\\n }\\n\\n /**\\n * @dev authorize the contract to receive the native token\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev validate token\\n */\\n modifier validToken(Token token) {\\n _validToken(token);\\n _;\\n }\\n\\n /**\\n * @dev validate price\\n */\\n modifier validPrice(Price memory price) {\\n _validPrice(price);\\n _;\\n }\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @notice sets the market price multiply\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMarketPriceMultiply(\\n uint32 newMarketPriceMultiply\\n ) external onlyAdmin greaterThanZero(newMarketPriceMultiply) {\\n _setMarketPriceMultiply(newMarketPriceMultiply);\\n }\\n\\n /**\\n * @notice sets the price decay half-life\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPriceDecayHalfLife(\\n uint32 newPriceDecayHalfLife\\n ) external onlyAdmin greaterThanZero(newPriceDecayHalfLife) {\\n _setPriceDecayHalfLife(newPriceDecayHalfLife);\\n }\\n\\n /**\\n * @notice sets the eth sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setEthSaleAmount(uint128 newEthSaleAmount) external onlyAdmin greaterThanZero(newEthSaleAmount) {\\n _setEthSaleAmount(newEthSaleAmount);\\n }\\n\\n /**\\n * @notice sets the min eth sale amount\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setMinEthSaleAmount(uint128 newMinEthSaleAmount) external onlyAdmin greaterThanZero(newMinEthSaleAmount) {\\n _setMinEthSaleAmount(newMinEthSaleAmount);\\n }\\n\\n /**\\n * @notice enable trading for TKN->ETH and set the initial price\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n * - can only enable trading for non-native tokens\\n */\\n function enableTrading(Token token, Price memory price) external onlyAdmin validPrice(price) {\\n if (token == NATIVE_TOKEN) {\\n revert InvalidToken();\\n }\\n _tradingStartTimes[token] = uint32(block.timestamp);\\n _initialPrice[token] = price;\\n emit TradingEnabled({ token: token, price: price });\\n }\\n\\n /**\\n * @notice enable trading for ETH->BNT and set the initial price\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function enableTradingETH(Price memory price) external onlyAdmin validPrice(price) {\\n _tradingStartTimes[NATIVE_TOKEN] = uint32(block.timestamp);\\n _initialPrice[NATIVE_TOKEN] = price;\\n _ethSaleAmount.current = Math.min(address(this).balance, _ethSaleAmount.initial).toUint128();\\n emit TradingEnabled({ token: NATIVE_TOKEN, price: price });\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function marketPriceMultiply() external view returns (uint32) {\\n return _marketPriceMultiply;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function priceDecayHalfLife() external view returns (uint32) {\\n return _priceDecayHalfLife;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function ethSaleAmount() external view returns (EthSaleAmount memory) {\\n return _ethSaleAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function minEthSaleAmount() external view returns (uint128) {\\n return _minEthSaleAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function tradingEnabled(Token token) external view returns (bool) {\\n return _tradingEnabled(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128) {\\n return _amountAvailableForTrading(token);\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view validToken(token) returns (uint128) {\\n Price memory currentPrice = tokenPrice(token);\\n // revert if price is not valid\\n _validPrice(currentPrice);\\n // calculate the target amount based on the current price and token\\n uint128 targetAmount = MathEx\\n .mulDivF(currentPrice.targetAmount, sourceAmount, currentPrice.sourceAmount)\\n .toUint128();\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n return targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) public view validToken(token) returns (uint128) {\\n // revert if not enough amount available for trade\\n if (targetAmount > _amountAvailableForTrading(token)) {\\n revert InsufficientAmountForTrading();\\n }\\n Price memory currentPrice = tokenPrice(token);\\n // revert if current price is not valid\\n _validPrice(currentPrice);\\n // calculate the trade input based on the current price\\n return MathEx.mulDivF(currentPrice.sourceAmount, targetAmount, currentPrice.targetAmount).toUint128();\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function tokenPrice(Token token) public view returns (Price memory) {\\n // cache trading start time to save gas\\n uint32 tradingStartTime = _tradingStartTimes[token];\\n // revert if trading hasn't been enabled for a token\\n if (tradingStartTime == 0) {\\n revert TradingDisabled();\\n }\\n // get time elapsed since trading was enabled\\n uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime;\\n // get initial price as set by enableTrading\\n Price memory price = _initialPrice[token];\\n // calculate the actual price by multiplying the amount by the factor\\n price.sourceAmount *= _marketPriceMultiply;\\n // get the current price by adjusting the amount with the exp decay formula\\n price.sourceAmount = ExpDecayMath\\n .calcExpDecay(price.sourceAmount, timeElapsed, _priceDecayHalfLife)\\n .toUint128();\\n // return the price\\n return price;\\n }\\n\\n /**\\n * @inheritdoc ICarbonPOL\\n */\\n function trade(\\n Token token,\\n uint128 targetAmount\\n ) external payable nonReentrant validToken(token) greaterThanZero(targetAmount) {\\n uint128 sourceAmount;\\n if (token == NATIVE_TOKEN) {\\n sourceAmount = _sellETHForBNT(targetAmount);\\n } else {\\n sourceAmount = _sellTokenForETH(token, targetAmount);\\n }\\n emit TokenTraded({ caller: msg.sender, token: token, sourceAmount: sourceAmount, targetAmount: targetAmount });\\n }\\n\\n function _sellTokenForETH(Token token, uint128 targetAmount) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(token, targetAmount);\\n // revert if trade requires 0 eth\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // check enough eth has been sent for the trade\\n if (msg.value < sourceAmount) {\\n revert InsufficientNativeTokenSent();\\n }\\n // transfer the tokens to caller\\n token.safeTransfer(msg.sender, targetAmount);\\n\\n // refund any excess eth to caller\\n if (msg.value > sourceAmount) {\\n payable(msg.sender).sendValue(msg.value - sourceAmount);\\n }\\n\\n return sourceAmount;\\n }\\n\\n function _sellETHForBNT(uint128 targetAmount) private returns (uint128) {\\n uint128 sourceAmount = expectedTradeInput(NATIVE_TOKEN, targetAmount);\\n // revert if trade requires 0 bnt\\n if (sourceAmount == 0) {\\n revert InvalidTrade();\\n }\\n // transfer the tokens from the user to the bnt address (burn them directly)\\n _bnt.safeTransferFrom(msg.sender, Token.unwrap(_bnt), sourceAmount);\\n\\n // transfer the eth to the user\\n payable(msg.sender).sendValue(targetAmount);\\n\\n // update the available eth sale amount\\n _ethSaleAmount.current -= targetAmount;\\n\\n // check if remaining eth sale amount is below the min eth sale amount\\n if (_ethSaleAmount.current < _minEthSaleAmount) {\\n // top up the eth sale amount\\n _ethSaleAmount.current = Math.min(address(this).balance, _ethSaleAmount.initial).toUint128();\\n // reset the price to double the current one\\n Price memory price = tokenPrice(NATIVE_TOKEN);\\n _initialPrice[NATIVE_TOKEN] = price;\\n _tradingStartTimes[NATIVE_TOKEN] = uint32(block.timestamp);\\n // emit price updated event\\n emit PriceUpdated({ token: NATIVE_TOKEN, price: price });\\n }\\n\\n return sourceAmount;\\n }\\n\\n /**\\n * @dev set market price multiply helper\\n */\\n function _setMarketPriceMultiply(uint32 newMarketPriceMultiply) private {\\n uint32 prevMarketPriceMultiply = _marketPriceMultiply;\\n\\n // return if the market price multiply is the same\\n if (prevMarketPriceMultiply == newMarketPriceMultiply) {\\n return;\\n }\\n\\n _marketPriceMultiply = newMarketPriceMultiply;\\n\\n emit MarketPriceMultiplyUpdated({\\n prevMarketPriceMultiply: prevMarketPriceMultiply,\\n newMarketPriceMultiply: newMarketPriceMultiply\\n });\\n }\\n\\n /**\\n * @dev set price decay half-life helper\\n */\\n function _setPriceDecayHalfLife(uint32 newPriceDecayHalfLife) private {\\n uint32 prevPriceDecayHalfLife = _priceDecayHalfLife;\\n\\n // return if the price decay half-life is the same\\n if (prevPriceDecayHalfLife == newPriceDecayHalfLife) {\\n return;\\n }\\n\\n _priceDecayHalfLife = newPriceDecayHalfLife;\\n\\n emit PriceDecayHalfLifeUpdated({\\n prevPriceDecayHalfLife: prevPriceDecayHalfLife,\\n newPriceDecayHalfLife: newPriceDecayHalfLife\\n });\\n }\\n\\n /**\\n * @dev set eth sale amount helper\\n */\\n function _setEthSaleAmount(uint128 newEthSaleAmount) private {\\n uint128 prevEthSaleAmount = _ethSaleAmount.initial;\\n\\n // return if the eth sale amount is the same\\n if (prevEthSaleAmount == newEthSaleAmount) {\\n return;\\n }\\n\\n _ethSaleAmount.initial = newEthSaleAmount;\\n\\n // check if the new sale amount is below the current available eth sale amount\\n if (newEthSaleAmount < _ethSaleAmount.current) {\\n _ethSaleAmount.current = Math.min(address(this).balance, _ethSaleAmount.initial).toUint128();\\n }\\n\\n emit EthSaleAmountUpdated({ prevEthSaleAmount: prevEthSaleAmount, newEthSaleAmount: newEthSaleAmount });\\n }\\n\\n /**\\n * @dev set min eth sale amount helper\\n */\\n function _setMinEthSaleAmount(uint128 newMinEthSaleAmount) private {\\n uint128 prevMinEthSaleAmount = _minEthSaleAmount;\\n\\n // return if the min eth sale amount is the same\\n if (prevMinEthSaleAmount == newMinEthSaleAmount) {\\n return;\\n }\\n\\n _minEthSaleAmount = newMinEthSaleAmount;\\n\\n emit MinEthSaleAmountUpdated({\\n prevMinEthSaleAmount: prevMinEthSaleAmount,\\n newMinEthSaleAmount: newMinEthSaleAmount\\n });\\n }\\n\\n /**\\n * @dev returns the token amount available for trading\\n */\\n function _amountAvailableForTrading(Token token) private view returns (uint128) {\\n if (token == NATIVE_TOKEN) {\\n return _ethSaleAmount.current;\\n } else {\\n return uint128(token.balanceOf(address(this)));\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validToken(Token token) private view {\\n // validate trading is enabled for token\\n if (!_tradingEnabled(token)) {\\n revert TradingDisabled();\\n }\\n }\\n\\n /**\\n * @dev validate token helper\\n */\\n function _validPrice(Price memory price) private pure {\\n if (price.sourceAmount == 0 || price.targetAmount == 0) {\\n revert InvalidPrice();\\n }\\n }\\n\\n /**\\n * @dev return true if trading is enabled for token\\n */\\n function _tradingEnabled(Token token) private view returns (bool) {\\n return _tradingStartTimes[token] != 0;\\n }\\n}\\n\",\"keccak256\":\"0x5b8a8239cb6701ed609722c32cb1a93994e5b61f82043287d2ee286d53b19358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/pol/interfaces/ICarbonPOL.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @notice CarbonPOL interface\\n */\\ninterface ICarbonPOL is IUpgradeable {\\n error InvalidToken();\\n error InvalidPrice();\\n error InvalidTrade();\\n error TradingDisabled();\\n error InsufficientNativeTokenSent();\\n error InsufficientAmountForTrading();\\n\\n struct Price {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct EthSaleAmount {\\n uint128 initial;\\n uint128 current;\\n }\\n\\n /**\\n * @notice triggered when trading is enabled for a token\\n */\\n event TradingEnabled(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered after a successful trade is executed\\n */\\n event TokenTraded(address indexed caller, Token indexed token, uint128 sourceAmount, uint128 targetAmount);\\n\\n /**\\n * @notice triggered after an eth trade leaves less than 10% of the initial eth sale amount\\n */\\n event PriceUpdated(Token indexed token, Price price);\\n\\n /**\\n * @notice triggered when the market price multiplier is updated\\n */\\n event MarketPriceMultiplyUpdated(uint32 prevMarketPriceMultiply, uint32 newMarketPriceMultiply);\\n\\n /**\\n * @notice triggered when the price decay halflife is updated\\n */\\n event PriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife);\\n\\n /**\\n * @notice triggered when the eth sale amount is updated\\n */\\n event EthSaleAmountUpdated(uint128 prevEthSaleAmount, uint128 newEthSaleAmount);\\n\\n /**\\n * @notice triggered when the min eth sale amount is updated\\n */\\n event MinEthSaleAmountUpdated(uint128 prevMinEthSaleAmount, uint128 newMinEthSaleAmount);\\n\\n /**\\n * @notice returns the market price multiplier\\n */\\n function marketPriceMultiply() external view returns (uint32);\\n\\n /**\\n * @notice returns the price decay half-life according to the exp decay formula\\n */\\n function priceDecayHalfLife() external view returns (uint32);\\n\\n /**\\n * @notice returns the initial and current eth sale amount\\n */\\n function ethSaleAmount() external view returns (EthSaleAmount memory);\\n\\n /**\\n * @notice returns the min eth sale amount - resets the current eth sale amount if below this amount after a trade\\n */\\n function minEthSaleAmount() external view returns (uint128);\\n\\n /**\\n * @notice returns true if trading is enabled for token\\n */\\n function tradingEnabled(Token token) external view returns (bool);\\n\\n /**\\n * @notice returns the amount available for trading for the token\\n */\\n function amountAvailableForTrading(Token token) external view returns (uint128);\\n\\n /**\\n * @notice returns the target amount expected given a source amount\\n */\\n function expectedTradeReturn(Token token, uint128 sourceAmount) external view returns (uint128 targetAmount);\\n\\n /**\\n * @notice returns the source amount required given a target amount\\n */\\n function expectedTradeInput(Token token, uint128 targetAmount) external view returns (uint128 sourceAmount);\\n\\n /**\\n * @notice returns the current token price (ETH / TKN)\\n * @notice if token == ETH, returns BNT / ETH price\\n */\\n function tokenPrice(Token token) external view returns (Price memory price);\\n\\n /**\\n * @notice trades ETH for *targetAmount* of token based on the current token price (trade by target amount)\\n * @notice if token == ETH, trades BNT for amount of ETH\\n */\\n function trade(Token token, uint128 targetAmount) external payable;\\n}\\n\",\"keccak256\":\"0xf2b832c9a435a0a7f59b111e12b84885fe27944223cf184600913efd800a94c3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0xe3b5a35bd3a75be705b6de9618db1ecf49ea738c7187d874dc5a0a0d2cf81f53\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/ExpDecayMath.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\nimport { MathEx } from \\\"./MathEx.sol\\\";\\n\\n/**\\n * @dev This library supports the calculation of exponential price decay\\n */\\nlibrary ExpDecayMath {\\n /**\\n * @dev returns the amount required for a token after a given time period since trading has been enabled\\n *\\n * the returned value is calculated as `amount / 2 ^ (timeElapsed / halfLife)`\\n * note that because the exponentiation function is limited to an input of up to (and excluding)\\n * 16 / ln 2, the input value to this function is limited by `timeElapsed / halfLife < 16 / ln 2`\\n */\\n function calcExpDecay(uint256 amount, uint32 timeElapsed, uint32 halfLife) internal pure returns (uint256) {\\n Fraction memory input = Fraction({ n: timeElapsed, d: halfLife });\\n Fraction memory output = MathEx.exp2(input);\\n return MathEx.mulDivF(amount, output.d, output.n);\\n }\\n}\\n\",\"keccak256\":\"0x0dc8b83464723a110c4ef9ef7ea1c6fede0c2d7bb05615cbdaa93886b8c4fad1\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x49cc44253aa440cf48c4275daa0e51414e4a65fd57c4b7fe9e3aac6588f2f4a4\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b5060405162003e1e38038062003e1e83398101604081905262000034916200094f565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b5062000981565b6001600160a01b038116620000855760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000a95750600054600160ff909116105b80620000c55750303b158015620000c5575060005460ff166001145b6200012e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000152576000805461ff0019166101001790555b6200015c620001a5565b801562000085576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff16620002015760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b6200020b62000221565b6200021562000291565b6200021f620002f7565b565b600054610100900460ff166200027d5760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b6200028762000394565b6200021f620003f0565b600054610100900460ff16620002ed5760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b6200021f62000490565b600054610100900460ff16620003535760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b6200035f6002620004f3565b6200036d620d2f0062000568565b6200038168056bc75e2d63100000620005eb565b6200021f678ac7230489e80000620006c0565b600054610100900460ff166200021f5760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b600054610100900460ff166200044c5760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b60c9805461ffff191660011790556200047560008051602062003dde8339815191528062000737565b6200021f60008051602062003dde8339815191523362000782565b600054610100900460ff16620004ec5760405162461bcd60e51b815260206004820152602b602482015260008051602062003dfe83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000125565b600160fb55565b61012d5463ffffffff90811690821681036200050d575050565b61012d805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527f04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b091015b60405180910390a15050565b61012d5463ffffffff640100000000909104811690821681036200058a575050565b61012d805463ffffffff60201b191664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391016200055c565b610130546001600160801b03908116908216810362000608575050565b61013080546001600160801b0319166001600160801b0384811691821792839055600160801b90920490911611156200067f576101305462000660906200065a9047906001600160801b031662000792565b620007ae565b61013080546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527f85e15b0826727feb528c06e9d1eec6c462de224bbb5b7c737824ae09ea83a7bc91016200055c565b610131546001600160801b039081169082168103620006dd575050565b61013180546001600160801b0319166001600160801b0384811691821790925560408051928416835260208301919091527fab3e74195d9db5b0262eea6c76eda46ba8bb5aed6f36164adbce526d219596d191016200055c565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200078e82826200081d565b5050565b6000818310620007a35781620007a5565b825b90505b92915050565b60006001600160801b03821115620008195760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b606482015260840162000125565b5090565b62000829828262000848565b6000828152609760205260409020620008439082620008ec565b505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166200078e5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620008a83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620007a5836001600160a01b03841660008181526001830160205260408120546200094657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620007a8565b506000620007a8565b6000602082840312156200096257600080fd5b81516001600160a01b03811681146200097a57600080fd5b9392505050565b6080516134416200099d600039600061135f01526134416000f3fe6080604052600436106101c65760003560e01c80639010d07c116100f7578063b88da7b111610095578063ea9986a911610064578063ea9986a914610586578063eec245e2146105a6578063f5044552146105c6578063fc7499b9146105e657600080fd5b8063b88da7b114610507578063bedf952514610526578063ca15c87314610546578063d547741f1461056657600080fd5b8063a217fddf116100d1578063a217fddf14610492578063a7ae00d2146104a7578063b184b520146104c7578063b319de9e146104e757600080fd5b80639010d07c146103e157806391d148541461041957806393867fb51461045f57600080fd5b806354fd4d5011610164578063824316881161013e578063824316881461033c57806384ba3f69146103745780638cd2403d146103a15780638f975d4c146103c157600080fd5b806354fd4d50146102e757806363ee9e4e146103035780638129fc1c1461032757600080fd5b80632f2ff15d116101a05780632f2ff15d1461026757806336568abe146102875780634747919d146102a75780634cb0821e146102ba57600080fd5b806301ffc9a7146101d25780630d108f2c14610207578063248a9ca31461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004612f09565b610632565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004612f4b565b61068e565b005b34801561023557600080fd5b50610259610244366004612f71565b60009081526065602052604090206001015490565b6040519081526020016101fe565b34801561027357600080fd5b50610227610282366004612f9f565b6106d5565b34801561029357600080fd5b506102276102a2366004612f9f565b6106ff565b6102276102b5366004612fe6565b61078c565b3480156102c657600080fd5b5061012d5463ffffffff165b60405163ffffffff90911681526020016101fe565b3480156102f357600080fd5b50604051600281526020016101fe565b34801561030f57600080fd5b5061012d54640100000000900463ffffffff166102d2565b34801561033357600080fd5b50610227610851565b34801561034857600080fd5b5061035c610357366004612fe6565b610971565b6040516001600160801b0390911681526020016101fe565b34801561038057600080fd5b5061039461038f36600461301b565b610a2c565b6040516101fe9190613038565b3480156103ad57600080fd5b506102276103bc36600461305c565b610b51565b3480156103cd57600080fd5b506102276103dc366004613150565b610bbc565b3480156103ed57600080fd5b506104016103fc36600461316c565b610d08565b6040516001600160a01b0390911681526020016101fe565b34801561042557600080fd5b506101f2610434366004612f9f565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561046b57600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096610259565b34801561049e57600080fd5b50610259600081565b3480156104b357600080fd5b5061035c6104c2366004612fe6565b610d27565b3480156104d357600080fd5b506102276104e236600461318e565b610dce565b3480156104f357600080fd5b5061022761050236600461318e565b610e14565b34801561051357600080fd5b50610131546001600160801b031661035c565b34801561053257600080fd5b506101f261054136600461301b565b610e5a565b34801561055257600080fd5b50610259610561366004612f71565b610e81565b34801561057257600080fd5b50610227610581366004612f9f565b610e98565b34801561059257600080fd5b506102276105a13660046131a9565b610ebd565b3480156105b257600080fd5b5061035c6105c136600461301b565b610fdb565b3480156105d257600080fd5b506102276105e1366004612f4b565b610fe6565b3480156105f257600080fd5b5060408051808201825260008082526020918201528151808301909252610130546001600160801b038082168452600160801b9091041690820152610394565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610688575061068882611029565b92915050565b6106b87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b8063ffffffff166106c88161111c565b6106d182611156565b5050565b6000828152606560205260409020600101546106f0816111f7565b6106fa8383611201565b505050565b6001600160a01b03811633146107825760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6106d18282611223565b610794611245565b8161079e8161129e565b816001600160801b03166107b18161111c565b60006001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036107e7576107e0846112f4565b90506107f4565b6107f18585611546565b90505b604080516001600160801b038084168252861660208201526001600160a01b0387169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a35050506106d1600160fb55565b600054610100900460ff16158080156108715750600054600160ff909116105b8061088b5750303b15801561088b575060005460ff166001145b6108fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b6000805460ff191660011790558015610920576000805461ff0019166101001790555b61092861162d565b801561096e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60008261097d8161129e565b600061098885610a2c565b9050610993816116b2565b60006109cb6109c683602001516001600160801b0316876001600160801b031685600001516001600160801b031661170a565b6117fe565b90506109d686611881565b6001600160801b0316816001600160801b03161115610a21576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b038216600090815261012e602052604081205463ffffffff1690819003610a9a576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610aa682426131ec565b6001600160a01b038516600090815261012f60209081526040918290208251808401909352546001600160801b03808216808552600160801b909204169183019190915261012d54929350909163ffffffff16908290610b07908390613209565b6001600160801b03908116909152825161012d54610b3e93506109c69291909116908590640100000000900463ffffffff166118d8565b6001600160801b03168152949350505050565b60c954600090610b669061ffff166001613234565b905061ffff8116600214610ba6576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b610be67f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b80610bf0816116b2565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6000527f986499b4ad39bbf2021624cfb3f810f08a98c4a5dc2082f7efd6d3dfbb53ca1a805463ffffffff19164263ffffffff1617905561012f60209081528251908301516001600160801b03918216600160801b91831691909102177f80dff77e1e936c662564150b996baf5db9b7ec2d73ee90f020226755abd1dcc35561013054610c98916109c69147911661191f565b61013080546001600160801b03928316600160801b02921691909117905560405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907fae3f48c001771f8e9868e24d47b9e4295b06b1d78072acf96f167074aa3fab6490610cfc908590613038565b60405180910390a25050565b6000828152609760205260408120610d209083611935565b9392505050565b600082610d338161129e565b610d3c84611881565b6001600160801b0316836001600160801b03161115610d87576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d9285610a2c565b9050610d9d816116b2565b610a216109c682600001516001600160801b0316866001600160801b031684602001516001600160801b031661170a565b610df87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b806001600160801b0316610e0b8161111c565b6106d182611941565b610e3e7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b806001600160801b0316610e518161111c565b6106d1826119ce565b6001600160a01b038116600090815261012e602052604081205463ffffffff161515610688565b600081815260976020526040812061068890611aaf565b600082815260656020526040902060010154610eb3816111f7565b6106fa8383611223565b610ee77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b80610ef1816116b2565b6001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03610f47576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815261012e60209081526040808320805463ffffffff421663ffffffff1990911617905561012f8252918290208551918601516001600160801b03908116600160801b029216919091179055517fae3f48c001771f8e9868e24d47b9e4295b06b1d78072acf96f167074aa3fab6490610fce908590613038565b60405180910390a2505050565b600061068882611881565b6110107f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b8063ffffffff166110208161111c565b6106d182611ab9565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061068857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610688565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d1576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000361096e576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d5463ffffffff64010000000090910481169082168103611177575050565b61012d80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b61096e8133611b25565b61120b8282611b9a565b60008281526097602052604090206106fa9082611c3c565b61122d8282611c51565b60008281526097602052604090206106fa9082611cd4565b600260fb54036112975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b600260fb55565b6001600160a01b038116600090815261012e602052604090205463ffffffff1661096e576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061131573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84610d27565b9050806001600160801b031660000361135a576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61139a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381169033906001600160801b038516611ce9565b6113ad336001600160801b038516611d19565b61013080548491906010906113d3908490600160801b90046001600160801b031661324f565b82546101009290920a6001600160801b038181021990931691831602179091556101315461013054908216600160801b90910490911610159050610688576101305461142d906109c69047906001600160801b031661191f565b61013080546001600160801b03928316600160801b029216919091179055600061146a73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610a2c565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600081905261012f60209081528251818401516001600160801b03908116600160801b029116177f80dff77e1e936c662564150b996baf5db9b7ec2d73ee90f020226755abd1dcc35561012e90527f986499b4ad39bbf2021624cfb3f810f08a98c4a5dc2082f7efd6d3dfbb53ca1a805463ffffffff421663ffffffff19909116179055604051919250907faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b90611537908490613038565b60405180910390a25092915050565b6000806115538484610d27565b9050806001600160801b0316600003611598576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03163410156115db576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115f86001600160a01b038516336001600160801b038616611e32565b806001600160801b0316341115610d2057610d2061161f6001600160801b0383163461326f565b3390611d19565b600160fb55565b600054610100900460ff166116985760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b6116a0611e97565b6116a8611f12565b6116b0611f85565b565b80516001600160801b031615806116d4575060208101516001600160801b0316155b1561096e576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060006117198686612029565b915091508160000361173e5783818161173457611734613282565b0492505050610d20565b838210611777576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611784878787612064565b905060008061179485858561207f565b91509150816000036117bc578681816117af576117af613282565b0495505050505050610d20565b60008781038816906117cf8484846120af565b905060006117eb838b816117e5576117e5613282565b046120ec565b919091029b9a5050505050505050505050565b60006001600160801b0382111561187d5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610779565b5090565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036118c057505061013054600160801b90046001600160801b031690565b6106886001600160a01b0383163061210d565b919050565b6040805180820190915263ffffffff80841682528216602082015260009081611900826121b4565b9050611915868260200151836000015161170a565b9695505050505050565b600081831061192e5781610d20565b5090919050565b6000610d2083836125ab565b610131546001600160801b03908116908216810361195d575050565b61013180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821790925560408051928416835260208301919091527fab3e74195d9db5b0262eea6c76eda46ba8bb5aed6f36164adbce526d219596d191016111eb565b610130546001600160801b0390811690821681036119ea575050565b61013080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115611a6f5761013054611a50906109c69047906001600160801b031661191f565b61013080546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527f85e15b0826727feb528c06e9d1eec6c462de224bbb5b7c737824ae09ea83a7bc91016111eb565b6000610688825490565b61012d5463ffffffff9081169082168103611ad2575050565b61012d805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527f04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b091016111eb565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d157611b58816125d5565b611b638360206125e7565b604051602001611b749291906132bc565b60408051601f198184030181529082905262461bcd60e51b82526107799160040161333d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d15760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bf83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d20836001600160a01b038416612810565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156106d15760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d20836001600160a01b03841661285f565b801580611cfa5750611cfa84612952565b611d1357611d136001600160a01b038516848484612979565b50505050565b80471015611d695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610779565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611db6576040519150601f19603f3d011682016040523d82523d6000602084013e611dbb565b606091505b50509050806106fa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610779565b80600003611e3f57505050565b611e4883612952565b15611e83576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611d13573d6000803e3d6000fd5b6106fa6001600160a01b0384168383612a2a565b600054610100900460ff16611f025760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b611f0a612a73565b6116b0612ade565b600054610100900460ff16611f7d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b6116b0612bab565b600054610100900460ff16611ff05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b611ffa6002611ab9565b612006620d2f00611156565b61201868056bc75e2d631000006119ce565b6116b0678ac7230489e80000611941565b60008060006120388585612c16565b905084840280821061205157908190039250905061205d565b60018183030393509150505b9250929050565b6000818061207457612074613282565b838509949350505050565b60008082841061209557508390508183036120a7565b6120a060018661326f565b9150508183035b935093915050565b6000806120cd83808303816120c6576120c6613282565b0460010190565b90508284816120de576120de613282565b048186021795945050505050565b60006001815b6008811015610a2557838202600203820291506001016120f2565b600061211883612952565b1561212e57506001600160a01b03811631610688565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d209190613370565b604080518082019091526000808252602082015260006121ed6f58b90bfbe8e7bcd5e4f1d9cc01f97b578460000151856020015161170a565b905060008080700800000000000000000000000000000000841061223d576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f100000000000000000000000000000008416156124225770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f20000000000000000000000000000000841615612464577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f400000000000000000000000000000008416156124a5576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156124d9576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b84161561250d576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b70020000000000000000000000000000000084161561254d576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b70040000000000000000000000000000000084161561258b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106125c2576125c2613389565b9060005260206000200154905092915050565b60606106886001600160a01b03831660145b606060006125f683600261339f565b6126019060026133b6565b67ffffffffffffffff811115612619576126196130ce565b6040519080825280601f01601f191660200182016040528015612643576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061267a5761267a613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106126dd576126dd613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061271984600261339f565b6127249060016133b6565b90505b60018111156127c1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061276557612765613389565b1a60f81b82828151811061277b5761277b613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936127ba816133c9565b9050612727565b508315610d205760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610779565b600081815260018301602052604081205461285757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610688565b506000610688565b6000818152600183016020526040812054801561294857600061288360018361326f565b85549091506000906128979060019061326f565b90508181146128fc5760008660000182815481106128b7576128b7613389565b90600052602060002001549050808760000184815481106128da576128da613389565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061290d5761290d6133e0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610688565b6000915050610688565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610688565b6040516001600160a01b0380851660248301528316604482015260648101829052611d139085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612c25565b6040516001600160a01b0383166024820152604481018290526106fa9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016129c6565b600054610100900460ff166116b05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b600054610100900460ff16612b495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b60c9805461ffff19166001179055612b817f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612d0d565b6116b07f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633612d58565b600054610100900460ff166116265760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b60006000198284099392505050565b6000612c7a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d629092919063ffffffff16565b9050805160001480612c9b575080806020019051810190612c9b91906133f6565b6106fa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610779565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6106d18282611201565b6060612d718484600085612d79565b949350505050565b606082471015612df15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610779565b600080866001600160a01b03168587604051612e0d9190613418565b60006040518083038185875af1925050503d8060008114612e4a576040519150601f19603f3d011682016040523d82523d6000602084013e612e4f565b606091505b5091509150612e6087838387612e6b565b979650505050505050565b60608315612eda578251600003612ed3576001600160a01b0385163b612ed35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610779565b5081612d71565b612d718383815115612eef5781518083602001fd5b8060405162461bcd60e51b8152600401610779919061333d565b600060208284031215612f1b57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d2057600080fd5b600060208284031215612f5d57600080fd5b813563ffffffff81168114610d2057600080fd5b600060208284031215612f8357600080fd5b5035919050565b6001600160a01b038116811461096e57600080fd5b60008060408385031215612fb257600080fd5b823591506020830135612fc481612f8a565b809150509250929050565b80356001600160801b03811681146118d357600080fd5b60008060408385031215612ff957600080fd5b823561300481612f8a565b915061301260208401612fcf565b90509250929050565b60006020828403121561302d57600080fd5b8135610d2081612f8a565b60408101610688828480516001600160801b03908116835260209182015116910152565b6000806020838503121561306f57600080fd5b823567ffffffffffffffff8082111561308757600080fd5b818501915085601f83011261309b57600080fd5b8135818111156130aa57600080fd5b8660208285010111156130bc57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6000604082840312156130f657600080fd5b6040516040810181811067ffffffffffffffff8211171561312757634e487b7160e01b600052604160045260246000fd5b60405290508061313683612fcf565b815261314460208401612fcf565b60208201525092915050565b60006040828403121561316257600080fd5b610d2083836130e4565b6000806040838503121561317f57600080fd5b50508035926020909101359150565b6000602082840312156131a057600080fd5b610d2082612fcf565b600080606083850312156131bc57600080fd5b82356131c781612f8a565b915061301284602085016130e4565b634e487b7160e01b600052601160045260246000fd5b63ffffffff828116828216039080821115610a2557610a256131d6565b6001600160801b0381811683821602808216919082811461322c5761322c6131d6565b505092915050565b61ffff818116838216019080821115610a2557610a256131d6565b6001600160801b03828116828216039080821115610a2557610a256131d6565b81810381811115610688576106886131d6565b634e487b7160e01b600052601260045260246000fd5b60005b838110156132b357818101518382015260200161329b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516132f4816017850160208801613298565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613331816028840160208801613298565b01602801949350505050565b602081526000825180602084015261335c816040850160208701613298565b601f01601f19169190910160400192915050565b60006020828403121561338257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610688576106886131d6565b80820180821115610688576106886131d6565b6000816133d8576133d86131d6565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561340857600080fd5b81518015158114610d2057600080fd5b6000825161342a818460208701613298565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106101c65760003560e01c80639010d07c116100f7578063b88da7b111610095578063ea9986a911610064578063ea9986a914610586578063eec245e2146105a6578063f5044552146105c6578063fc7499b9146105e657600080fd5b8063b88da7b114610507578063bedf952514610526578063ca15c87314610546578063d547741f1461056657600080fd5b8063a217fddf116100d1578063a217fddf14610492578063a7ae00d2146104a7578063b184b520146104c7578063b319de9e146104e757600080fd5b80639010d07c146103e157806391d148541461041957806393867fb51461045f57600080fd5b806354fd4d5011610164578063824316881161013e578063824316881461033c57806384ba3f69146103745780638cd2403d146103a15780638f975d4c146103c157600080fd5b806354fd4d50146102e757806363ee9e4e146103035780638129fc1c1461032757600080fd5b80632f2ff15d116101a05780632f2ff15d1461026757806336568abe146102875780634747919d146102a75780634cb0821e146102ba57600080fd5b806301ffc9a7146101d25780630d108f2c14610207578063248a9ca31461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004612f09565b610632565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004612f4b565b61068e565b005b34801561023557600080fd5b50610259610244366004612f71565b60009081526065602052604090206001015490565b6040519081526020016101fe565b34801561027357600080fd5b50610227610282366004612f9f565b6106d5565b34801561029357600080fd5b506102276102a2366004612f9f565b6106ff565b6102276102b5366004612fe6565b61078c565b3480156102c657600080fd5b5061012d5463ffffffff165b60405163ffffffff90911681526020016101fe565b3480156102f357600080fd5b50604051600281526020016101fe565b34801561030f57600080fd5b5061012d54640100000000900463ffffffff166102d2565b34801561033357600080fd5b50610227610851565b34801561034857600080fd5b5061035c610357366004612fe6565b610971565b6040516001600160801b0390911681526020016101fe565b34801561038057600080fd5b5061039461038f36600461301b565b610a2c565b6040516101fe9190613038565b3480156103ad57600080fd5b506102276103bc36600461305c565b610b51565b3480156103cd57600080fd5b506102276103dc366004613150565b610bbc565b3480156103ed57600080fd5b506104016103fc36600461316c565b610d08565b6040516001600160a01b0390911681526020016101fe565b34801561042557600080fd5b506101f2610434366004612f9f565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561046b57600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096610259565b34801561049e57600080fd5b50610259600081565b3480156104b357600080fd5b5061035c6104c2366004612fe6565b610d27565b3480156104d357600080fd5b506102276104e236600461318e565b610dce565b3480156104f357600080fd5b5061022761050236600461318e565b610e14565b34801561051357600080fd5b50610131546001600160801b031661035c565b34801561053257600080fd5b506101f261054136600461301b565b610e5a565b34801561055257600080fd5b50610259610561366004612f71565b610e81565b34801561057257600080fd5b50610227610581366004612f9f565b610e98565b34801561059257600080fd5b506102276105a13660046131a9565b610ebd565b3480156105b257600080fd5b5061035c6105c136600461301b565b610fdb565b3480156105d257600080fd5b506102276105e1366004612f4b565b610fe6565b3480156105f257600080fd5b5060408051808201825260008082526020918201528151808301909252610130546001600160801b038082168452600160801b9091041690820152610394565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610688575061068882611029565b92915050565b6106b87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b8063ffffffff166106c88161111c565b6106d182611156565b5050565b6000828152606560205260409020600101546106f0816111f7565b6106fa8383611201565b505050565b6001600160a01b03811633146107825760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6106d18282611223565b610794611245565b8161079e8161129e565b816001600160801b03166107b18161111c565b60006001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036107e7576107e0846112f4565b90506107f4565b6107f18585611546565b90505b604080516001600160801b038084168252861660208201526001600160a01b0387169133917f16ddee9b3f1b2e6f797172fe2cd10a214e749294074e075e451f95aecd0b958c910160405180910390a35050506106d1600160fb55565b600054610100900460ff16158080156108715750600054600160ff909116105b8061088b5750303b15801561088b575060005460ff166001145b6108fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b6000805460ff191660011790558015610920576000805461ff0019166101001790555b61092861162d565b801561096e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60008261097d8161129e565b600061098885610a2c565b9050610993816116b2565b60006109cb6109c683602001516001600160801b0316876001600160801b031685600001516001600160801b031661170a565b6117fe565b90506109d686611881565b6001600160801b0316816001600160801b03161115610a21576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250505b5092915050565b60408051808201909152600080825260208201526001600160a01b038216600090815261012e602052604081205463ffffffff1690819003610a9a576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610aa682426131ec565b6001600160a01b038516600090815261012f60209081526040918290208251808401909352546001600160801b03808216808552600160801b909204169183019190915261012d54929350909163ffffffff16908290610b07908390613209565b6001600160801b03908116909152825161012d54610b3e93506109c69291909116908590640100000000900463ffffffff166118d8565b6001600160801b03168152949350505050565b60c954600090610b669061ffff166001613234565b905061ffff8116600214610ba6576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b610be67f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b80610bf0816116b2565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6000527f986499b4ad39bbf2021624cfb3f810f08a98c4a5dc2082f7efd6d3dfbb53ca1a805463ffffffff19164263ffffffff1617905561012f60209081528251908301516001600160801b03918216600160801b91831691909102177f80dff77e1e936c662564150b996baf5db9b7ec2d73ee90f020226755abd1dcc35561013054610c98916109c69147911661191f565b61013080546001600160801b03928316600160801b02921691909117905560405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907fae3f48c001771f8e9868e24d47b9e4295b06b1d78072acf96f167074aa3fab6490610cfc908590613038565b60405180910390a25050565b6000828152609760205260408120610d209083611935565b9392505050565b600082610d338161129e565b610d3c84611881565b6001600160801b0316836001600160801b03161115610d87576040517f8e26ecdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d9285610a2c565b9050610d9d816116b2565b610a216109c682600001516001600160801b0316866001600160801b031684602001516001600160801b031661170a565b610df87f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b806001600160801b0316610e0b8161111c565b6106d182611941565b610e3e7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b806001600160801b0316610e518161111c565b6106d1826119ce565b6001600160a01b038116600090815261012e602052604081205463ffffffff161515610688565b600081815260976020526040812061068890611aaf565b600082815260656020526040902060010154610eb3816111f7565b6106fa8383611223565b610ee77f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b80610ef1816116b2565b6001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03610f47576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815261012e60209081526040808320805463ffffffff421663ffffffff1990911617905561012f8252918290208551918601516001600160801b03908116600160801b029216919091179055517fae3f48c001771f8e9868e24d47b9e4295b06b1d78072acf96f167074aa3fab6490610fce908590613038565b60405180910390a2505050565b600061068882611881565b6110107f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336110c0565b8063ffffffff166110208161111c565b6106d182611ab9565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061068857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610688565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d1576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000361096e576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d5463ffffffff64010000000090910481169082168103611177575050565b61012d80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1664010000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c391015b60405180910390a15050565b61096e8133611b25565b61120b8282611b9a565b60008281526097602052604090206106fa9082611c3c565b61122d8282611c51565b60008281526097602052604090206106fa9082611cd4565b600260fb54036112975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b600260fb55565b6001600160a01b038116600090815261012e602052604090205463ffffffff1661096e576040517fbcb8b8fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061131573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84610d27565b9050806001600160801b031660000361135a576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61139a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381169033906001600160801b038516611ce9565b6113ad336001600160801b038516611d19565b61013080548491906010906113d3908490600160801b90046001600160801b031661324f565b82546101009290920a6001600160801b038181021990931691831602179091556101315461013054908216600160801b90910490911610159050610688576101305461142d906109c69047906001600160801b031661191f565b61013080546001600160801b03928316600160801b029216919091179055600061146a73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610a2c565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600081905261012f60209081528251818401516001600160801b03908116600160801b029116177f80dff77e1e936c662564150b996baf5db9b7ec2d73ee90f020226755abd1dcc35561012e90527f986499b4ad39bbf2021624cfb3f810f08a98c4a5dc2082f7efd6d3dfbb53ca1a805463ffffffff421663ffffffff19909116179055604051919250907faa86acbf67bc5e97ce95471a279336f9fa5bd2ac8f64e81ac442a0972b0c633b90611537908490613038565b60405180910390a25092915050565b6000806115538484610d27565b9050806001600160801b0316600003611598576040517fd69b537900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03163410156115db576040517f9086bdc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115f86001600160a01b038516336001600160801b038616611e32565b806001600160801b0316341115610d2057610d2061161f6001600160801b0383163461326f565b3390611d19565b600160fb55565b600054610100900460ff166116985760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b6116a0611e97565b6116a8611f12565b6116b0611f85565b565b80516001600160801b031615806116d4575060208101516001600160801b0316155b1561096e576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060006117198686612029565b915091508160000361173e5783818161173457611734613282565b0492505050610d20565b838210611777576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611784878787612064565b905060008061179485858561207f565b91509150816000036117bc578681816117af576117af613282565b0495505050505050610d20565b60008781038816906117cf8484846120af565b905060006117eb838b816117e5576117e5613282565b046120ec565b919091029b9a5050505050505050505050565b60006001600160801b0382111561187d5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610779565b5090565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036118c057505061013054600160801b90046001600160801b031690565b6106886001600160a01b0383163061210d565b919050565b6040805180820190915263ffffffff80841682528216602082015260009081611900826121b4565b9050611915868260200151836000015161170a565b9695505050505050565b600081831061192e5781610d20565b5090919050565b6000610d2083836125ab565b610131546001600160801b03908116908216810361195d575050565b61013180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821790925560408051928416835260208301919091527fab3e74195d9db5b0262eea6c76eda46ba8bb5aed6f36164adbce526d219596d191016111eb565b610130546001600160801b0390811690821681036119ea575050565b61013080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0384811691821792839055600160801b9092049091161115611a6f5761013054611a50906109c69047906001600160801b031661191f565b61013080546001600160801b03928316600160801b0292169190911790555b604080516001600160801b038084168252841660208201527f85e15b0826727feb528c06e9d1eec6c462de224bbb5b7c737824ae09ea83a7bc91016111eb565b6000610688825490565b61012d5463ffffffff9081169082168103611ad2575050565b61012d805463ffffffff191663ffffffff84811691821790925560408051928416835260208301919091527f04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b091016111eb565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d157611b58816125d5565b611b638360206125e7565b604051602001611b749291906132bc565b60408051601f198184030181529082905262461bcd60e51b82526107799160040161333d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166106d15760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bf83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d20836001600160a01b038416612810565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156106d15760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d20836001600160a01b03841661285f565b801580611cfa5750611cfa84612952565b611d1357611d136001600160a01b038516848484612979565b50505050565b80471015611d695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610779565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611db6576040519150601f19603f3d011682016040523d82523d6000602084013e611dbb565b606091505b50509050806106fa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610779565b80600003611e3f57505050565b611e4883612952565b15611e83576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611d13573d6000803e3d6000fd5b6106fa6001600160a01b0384168383612a2a565b600054610100900460ff16611f025760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b611f0a612a73565b6116b0612ade565b600054610100900460ff16611f7d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b6116b0612bab565b600054610100900460ff16611ff05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b611ffa6002611ab9565b612006620d2f00611156565b61201868056bc75e2d631000006119ce565b6116b0678ac7230489e80000611941565b60008060006120388585612c16565b905084840280821061205157908190039250905061205d565b60018183030393509150505b9250929050565b6000818061207457612074613282565b838509949350505050565b60008082841061209557508390508183036120a7565b6120a060018661326f565b9150508183035b935093915050565b6000806120cd83808303816120c6576120c6613282565b0460010190565b90508284816120de576120de613282565b048186021795945050505050565b60006001815b6008811015610a2557838202600203820291506001016120f2565b600061211883612952565b1561212e57506001600160a01b03811631610688565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d209190613370565b604080518082019091526000808252602082015260006121ed6f58b90bfbe8e7bcd5e4f1d9cc01f97b578460000151856020015161170a565b905060008080700800000000000000000000000000000000841061223d576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6f10000000000000000000000000000000840692508291506001607f1b8280020491506710e1b3be415a00008202016001607f1b8383020491506705a0913f6b1e00008202016001607f1b838302049150670168244fdac780008202016001607f1b838302049150664807432bc180008202016001607f1b838302049150660c0135dca040008202016001607f1b8383020491506601b707b1cdc0008202016001607f1b8383020491506536e0f639b8008202016001607f1b838302049150650618fee9f8008202016001607f1b838302049150649c197dcc008202016001607f1b838302049150640e30dce4008202016001607f1b83830204915064012ebd13008202016001607f1b8383020491506317499f008202016001607f1b8383020491506301a9d4808202016001607f1b838302049150621c63808202016001607f1b8383020491506201c6388202016001607f1b838302049150611ab88202016001607f1b83830204915061017c8202016001607f1b83830204915060148202016001607f1b83830204915081016001607f1b836721c3677c82b400008304010190506f100000000000000000000000000000008416156124225770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f982020490505b6f20000000000000000000000000000000841615612464577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77882020490505b6f400000000000000000000000000000008416156124a5576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed582020490505b6001607f1b8416156124d9576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e82020490505b600160801b84161561250d576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c582020490505b70020000000000000000000000000000000084161561254d576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d782020490505b70040000000000000000000000000000000084161561258b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30782020490505b604080518082019091529081526001607f1b602082015295945050505050565b60008260000182815481106125c2576125c2613389565b9060005260206000200154905092915050565b60606106886001600160a01b03831660145b606060006125f683600261339f565b6126019060026133b6565b67ffffffffffffffff811115612619576126196130ce565b6040519080825280601f01601f191660200182016040528015612643576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061267a5761267a613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106126dd576126dd613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061271984600261339f565b6127249060016133b6565b90505b60018111156127c1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061276557612765613389565b1a60f81b82828151811061277b5761277b613389565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936127ba816133c9565b9050612727565b508315610d205760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610779565b600081815260018301602052604081205461285757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610688565b506000610688565b6000818152600183016020526040812054801561294857600061288360018361326f565b85549091506000906128979060019061326f565b90508181146128fc5760008660000182815481106128b7576128b7613389565b90600052602060002001549050808760000184815481106128da576128da613389565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061290d5761290d6133e0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610688565b6000915050610688565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610688565b6040516001600160a01b0380851660248301528316604482015260648101829052611d139085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612c25565b6040516001600160a01b0383166024820152604481018290526106fa9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016129c6565b600054610100900460ff166116b05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b600054610100900460ff16612b495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b60c9805461ffff19166001179055612b817f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612d0d565b6116b07f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633612d58565b600054610100900460ff166116265760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610779565b60006000198284099392505050565b6000612c7a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d629092919063ffffffff16565b9050805160001480612c9b575080806020019051810190612c9b91906133f6565b6106fa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610779565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6106d18282611201565b6060612d718484600085612d79565b949350505050565b606082471015612df15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610779565b600080866001600160a01b03168587604051612e0d9190613418565b60006040518083038185875af1925050503d8060008114612e4a576040519150601f19603f3d011682016040523d82523d6000602084013e612e4f565b606091505b5091509150612e6087838387612e6b565b979650505050505050565b60608315612eda578251600003612ed3576001600160a01b0385163b612ed35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610779565b5081612d71565b612d718383815115612eef5781518083602001fd5b8060405162461bcd60e51b8152600401610779919061333d565b600060208284031215612f1b57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d2057600080fd5b600060208284031215612f5d57600080fd5b813563ffffffff81168114610d2057600080fd5b600060208284031215612f8357600080fd5b5035919050565b6001600160a01b038116811461096e57600080fd5b60008060408385031215612fb257600080fd5b823591506020830135612fc481612f8a565b809150509250929050565b80356001600160801b03811681146118d357600080fd5b60008060408385031215612ff957600080fd5b823561300481612f8a565b915061301260208401612fcf565b90509250929050565b60006020828403121561302d57600080fd5b8135610d2081612f8a565b60408101610688828480516001600160801b03908116835260209182015116910152565b6000806020838503121561306f57600080fd5b823567ffffffffffffffff8082111561308757600080fd5b818501915085601f83011261309b57600080fd5b8135818111156130aa57600080fd5b8660208285010111156130bc57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b6000604082840312156130f657600080fd5b6040516040810181811067ffffffffffffffff8211171561312757634e487b7160e01b600052604160045260246000fd5b60405290508061313683612fcf565b815261314460208401612fcf565b60208201525092915050565b60006040828403121561316257600080fd5b610d2083836130e4565b6000806040838503121561317f57600080fd5b50508035926020909101359150565b6000602082840312156131a057600080fd5b610d2082612fcf565b600080606083850312156131bc57600080fd5b82356131c781612f8a565b915061301284602085016130e4565b634e487b7160e01b600052601160045260246000fd5b63ffffffff828116828216039080821115610a2557610a256131d6565b6001600160801b0381811683821602808216919082811461322c5761322c6131d6565b505092915050565b61ffff818116838216019080821115610a2557610a256131d6565b6001600160801b03828116828216039080821115610a2557610a256131d6565b81810381811115610688576106886131d6565b634e487b7160e01b600052601260045260246000fd5b60005b838110156132b357818101518382015260200161329b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516132f4816017850160208801613298565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613331816028840160208801613298565b01602801949350505050565b602081526000825180602084015261335c816040850160208701613298565b601f01601f19169190910160400192915050565b60006020828403121561338257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610688576106886131d6565b80820180821115610688576106886131d6565b6000816133d8576133d86131d6565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561340857600080fd5b81518015158114610d2057600080fd5b6000825161342a818460208701613298565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "events": { - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - } - }, - "kind": "dev", - "methods": { - "constructor": { - "details": "used to initialize the implementation" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "EthSaleAmountUpdated(uint128,uint128)": { - "notice": "triggered when the eth sale amount is updated" - }, - "MarketPriceMultiplyUpdated(uint32,uint32)": { - "notice": "triggered when the market price multiplier is updated" - }, - "MinEthSaleAmountUpdated(uint128,uint128)": { - "notice": "triggered when the min eth sale amount is updated" - }, - "PriceDecayHalfLifeUpdated(uint32,uint32)": { - "notice": "triggered when the price decay halflife is updated" - }, - "PriceUpdated(address,(uint128,uint128))": { - "notice": "triggered after an eth trade leaves less than 10% of the initial eth sale amount" - }, - "TokenTraded(address,address,uint128,uint128)": { - "notice": "triggered after a successful trade is executed" - }, - "TradingEnabled(address,(uint128,uint128))": { - "notice": "triggered when trading is enabled for a token" - } - }, - "kind": "user", - "methods": { - "amountAvailableForTrading(address)": { - "notice": "returns the amount available for trading for the token" - }, - "enableTrading(address,(uint128,uint128))": { - "notice": "enable trading for TKN->ETH and set the initial price requirements: - the caller must be the admin of the contract - can only enable trading for non-native tokens" - }, - "enableTradingETH((uint128,uint128))": { - "notice": "enable trading for ETH->BNT and set the initial price requirements: - the caller must be the admin of the contract" - }, - "ethSaleAmount()": { - "notice": "returns the initial and current eth sale amount" - }, - "expectedTradeInput(address,uint128)": { - "notice": "returns the source amount required given a target amount" - }, - "expectedTradeReturn(address,uint128)": { - "notice": "returns the target amount expected given a source amount" - }, - "marketPriceMultiply()": { - "notice": "returns the market price multiplier" - }, - "minEthSaleAmount()": { - "notice": "returns the min eth sale amount - resets the current eth sale amount if below this amount after a trade" - }, - "priceDecayHalfLife()": { - "notice": "returns the price decay half-life according to the exp decay formula" - }, - "setEthSaleAmount(uint128)": { - "notice": "sets the eth sale amount requirements: - the caller must be the admin of the contract" - }, - "setMarketPriceMultiply(uint32)": { - "notice": "sets the market price multiply requirements: - the caller must be the admin of the contract" - }, - "setMinEthSaleAmount(uint128)": { - "notice": "sets the min eth sale amount requirements: - the caller must be the admin of the contract" - }, - "setPriceDecayHalfLife(uint32)": { - "notice": "sets the price decay half-life requirements: - the caller must be the admin of the contract" - }, - "tokenPrice(address)": { - "notice": "returns the current token price (ETH / TKN)if token == ETH, returns BNT / ETH price" - }, - "trade(address,uint128)": { - "notice": "trades ETH for *targetAmount* of token based on the current token price (trade by target amount)if token == ETH, trades BNT for amount of ETH" - }, - "tradingEnabled(address)": { - "notice": "returns true if trading is enabled for token" - } - }, - "notice": "CarbonPOL contract", - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2445, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2718, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)" - }, - { - "astId": 143, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21692, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 21698, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 891, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256" - }, - { - "astId": 960, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 19075, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_marketPriceMultiply", - "offset": 0, - "slot": "301", - "type": "t_uint32" - }, - { - "astId": 19077, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_priceDecayHalfLife", - "offset": 4, - "slot": "301", - "type": "t_uint32" - }, - { - "astId": 19082, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_tradingStartTimes", - "offset": 0, - "slot": "302", - "type": "t_mapping(t_userDefinedValueType(Token)20264,t_uint32)" - }, - { - "astId": 19088, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_initialPrice", - "offset": 0, - "slot": "303", - "type": "t_mapping(t_userDefinedValueType(Token)20264,t_struct(Price)20054_storage)" - }, - { - "astId": 19091, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_ethSaleAmount", - "offset": 0, - "slot": "304", - "type": "t_struct(EthSaleAmount)20059_storage" - }, - { - "astId": 19093, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_minEthSaleAmount", - "offset": 0, - "slot": "305", - "type": "t_uint128" - }, - { - "astId": 19099, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "__gap", - "offset": 0, - "slot": "306", - "type": "t_array(t_uint256)45_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)5569_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_userDefinedValueType(Token)20264,t_struct(Price)20054_storage)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)20264", - "label": "mapping(Token => struct ICarbonPOL.Price)", - "numberOfBytes": "32", - "value": "t_struct(Price)20054_storage" - }, - "t_mapping(t_userDefinedValueType(Token)20264,t_uint32)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)20264", - "label": "mapping(Token => uint32)", - "numberOfBytes": "32", - "value": "t_uint32" - }, - "t_struct(AddressSet)5569_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 5568, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)5254_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(EthSaleAmount)20059_storage": { - "encoding": "inplace", - "label": "struct ICarbonPOL.EthSaleAmount", - "members": [ - { - "astId": 20056, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "initial", - "offset": 0, - "slot": "0", - "type": "t_uint128" - }, - { - "astId": 20058, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "current", - "offset": 16, - "slot": "0", - "type": "t_uint128" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Price)20054_storage": { - "encoding": "inplace", - "label": "struct ICarbonPOL.Price", - "members": [ - { - "astId": 20051, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "sourceAmount", - "offset": 0, - "slot": "0", - "type": "t_uint128" - }, - { - "astId": 20053, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "targetAmount", - "offset": 16, - "slot": "0", - "type": "t_uint128" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)5254_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 5249, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 5253, - "contract": "contracts/pol/CarbonPOL.sol:CarbonPOL", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_userDefinedValueType(Token)20264": { - "encoding": "inplace", - "label": "Token", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonPOL_Proxy.json b/src/contracts/ethereum/CarbonPOL_Proxy.json deleted file mode 100644 index 7a6743a..0000000 --- a/src/contracts/ethereum/CarbonPOL_Proxy.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "transactionIndex": 55, - "gasUsed": "833913", - "logsBloom": "0x000000040000000008000002000000004800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000200000020000001000800000000000080000200000080000000200004000000000000008000000008000000000000000010000000000000100000000000000000000000000000000000000a0000000008000800008000000000000000080000000000400000000010000000400001000000000000000000020000000000000000000040000000000000400000120000000000020000000000000000000000000020000000000000000000000000000000000000000", - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a", - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "logs": [ - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000945ac60e655a84b6638216521b391ae984287105" - ], - "data": "0x", - "logIndex": 114, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 115, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 116, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x04ee60e68c7a4f836ca7ca7f5d9772049ac5846fc054b0d809e0e3de754952b0" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 117, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x91a3ff80be5536f6b4a03994984844ded4c1470ac2e7c1a1f9445464358788c3" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d2f00", - "logIndex": 118, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 119, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - }, - { - "transactionIndex": 55, - "blockNumber": 18120670, - "transactionHash": "0x8995fccebbf4a6397daef2a40af9748756098968f13ea5f772b889741e378460", - "address": "0xD06146D292F9651C1D7cf54A3162791DFc2bEf46", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 120, - "blockHash": "0xbc097dfbdb26285860c662f202a308b0d7f0c5a1efe0eb4908c722780229c05a" - } - ], - "blockNumber": 18120670, - "cumulativeGasUsed": "5635680", - "status": 1, - "byzantium": true - }, - "args": [ - "0x945ac60e655a84b6638216521b391ae984287105", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonVortex.json b/src/contracts/ethereum/CarbonVortex.json deleted file mode 100644 index 3d7abb1..0000000 --- a/src/contracts/ethereum/CarbonVortex.json +++ /dev/null @@ -1,747 +0,0 @@ -{ - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "DuplicateToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTokenLength", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "prevRewardsPPM", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRewardsPPM", - "type": "uint256" - } - ], - "name": "RewardsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "Token[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "rewardAmounts", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "burnAmount", - "type": "uint256" - } - ], - "name": "TokensBurned", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "availableTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsPPM", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newRewardsPPM", - "type": "uint256" - } - ], - "name": "setRewardsPPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalBurned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "transactionIndex": 47, - "gasUsed": "833372", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000040000000000800200000020000000000000000000000080000000000000000000200004000000000000008000000008800000000000000000000000000000100000000000000000000000000000000000000a0000000000000800008000000000000000000100000000400000100000000000000001000000000080020000020000000000000000000040000000000000400000100000000000020000000000000000000000080020000000000000000000000000000000000000000", - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a", - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "logs": [ - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000004610fc898f94ac0b6bfe2b836fd59f6d03195445" - ], - "data": "0x", - "logIndex": 131, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 132, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 133, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xcd45ee15b111450ac669d57182e8b04590f172b8518828d9d4d7befb4f14de98" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000056bc75e2d63100000", - "logIndex": 134, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 135, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 136, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - } - ], - "blockNumber": 17087475, - "cumulativeGasUsed": "5903516", - "status": 1, - "byzantium": true - }, - "args": [ - "0x4610FC898f94aC0B6Bfe2b836fD59F6d03195445", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 2, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "postUpgrade", - "args": [ - "0x" - ] - }, - "implementation": "0x72717080Da2E9e057dC29D25eeeB5d4873F0FB9E", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonVortex_Implementation.json b/src/contracts/ethereum/CarbonVortex_Implementation.json deleted file mode 100644 index a4cf66e..0000000 --- a/src/contracts/ethereum/CarbonVortex_Implementation.json +++ /dev/null @@ -1,875 +0,0 @@ -{ - "address": "0x72717080Da2E9e057dC29D25eeeB5d4873F0FB9E", - "abi": [ - { - "inputs": [ - { - "internalType": "Token", - "name": "bnt", - "type": "address" - }, - { - "internalType": "contract ICarbonController", - "name": "carbonController", - "type": "address" - }, - { - "internalType": "contract IBancorNetwork", - "name": "bancorNetwork", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "DuplicateToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidToken", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTokenLength", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "prevRewardsPPM", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRewardsPPM", - "type": "uint256" - } - ], - "name": "RewardsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "Token[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "rewardAmounts", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "burnAmount", - "type": "uint256" - } - ], - "name": "TokensBurned", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "availableTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsPPM", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newRewardsPPM", - "type": "uint256" - } - ], - "name": "setRewardsPPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalBurned", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x11e1197b96d10e11ac4d999457e44437438223e84b94e4f8aaa6451851018460", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x72717080Da2E9e057dC29D25eeeB5d4873F0FB9E", - "transactionIndex": 153, - "gasUsed": "2330250", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa362e69d287bd19e97c06a090a7b6dd432c7885c5bbfec81c30ef35184b5e8cb", - "transactionHash": "0x11e1197b96d10e11ac4d999457e44437438223e84b94e4f8aaa6451851018460", - "logs": [], - "blockNumber": 17634944, - "cumulativeGasUsed": "14927211", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C", - "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", - "0xeEF417e1D5CC832e619ae18D2F140De2999dD4fB" - ], - "numDeployments": 2, - "solcInputHash": "a2a12afa435c27ae8c5cf17764ea6bd9", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"bnt\",\"type\":\"address\"},{\"internalType\":\"contract ICarbonController\",\"name\":\"carbonController\",\"type\":\"address\"},{\"internalType\":\"contract IBancorNetwork\",\"name\":\"bancorNetwork\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevRewardsPPM\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRewardsPPM\",\"type\":\"uint256\"}],\"name\":\"RewardsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"rewardAmounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAmount\",\"type\":\"uint256\"}],\"name\":\"TokensBurned\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"availableTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsPPM\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newRewardsPPM\",\"type\":\"uint256\"}],\"name\":\"setRewardsPPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBurned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"CarbonVortex contract\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RewardsUpdated(uint256,uint256)\":{\"details\":\"triggered when the rewards ppm are updated\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TokensBurned(address,address[],uint256[],uint256)\":{\"details\":\"triggered after a successful burn is executed\"}},\"kind\":\"dev\",\"methods\":{\"availableTokens(address)\":{\"details\":\"returns the total available fees for the given token\"},\"constructor\":{\"details\":\"a \\\"virtual\\\" constructor that is only used to set immutable state variables\"},\"execute(address[])\":{\"details\":\"withdraws the fees of the provided tokens from Carbonconverts them along with the available contract token balance to BNT,rewards the caller and burns the rest of the tokens\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"rewardsPPM()\":{\"details\":\"returns the rewards percentage ppm\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"setRewardsPPM(uint256)\":{\"details\":\"sets the rewards percentage ppm requirements: - the caller must be the admin of the contract\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalBurned()\":{\"details\":\"returns the total amount burned\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vortex/CarbonVortex.sol\":\"CarbonVortex\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xcef50f95b43b038aa40aed25b62fc45906c681a5c1d504a4fdcf3bc6330a8d4b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xe238883c87615a13ecedcf1b1e4f4a6576f89a763b9c5d8b1296573675b2cd53\",\"license\":\"BUSL-1.1\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { MathUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\\\";\\nimport { SafeCastUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using MathUpgradeable for uint256;\\n using SafeCastUpgradeable for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 2000; // 0.2%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 4] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount) private view returns (uint128) {\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - _tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount) private view returns (uint128) {\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - _tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = MathUpgradeable.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n return MathEx.mulDivF(temp2, temp3 / factor, temp4 + temp5);\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = MathUpgradeable.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbe4533c3d9e5f15930c11366271ef75fd7b2ef63268c838a5c8d23993136b5e5\",\"license\":\"BUSL-1.1\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x19a492bfeeb4707268bc46ecf607a5ad49f5e6ef1f3e8d3ae4f7ee847f25a0f2\",\"license\":\"BUSL-1.1\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x5877f3f23877d040294d2fad57e36b933a9b44efccc49c03218723d8e71d0062\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x80e0622d62d1415b8e19109151b13705e5b593ffe4fa1c39ea91b6eb27cfd760\",\"license\":\"BUSL-1.1\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x944fc558dec8d96c2caeb5a5a597773911cc061a8a7f7d0c56e7fdaa75e6e408\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3e376fff44513f87ffb6359969ad0bd3221651c5c64f5458d5aba36d095cb155\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1954602c3b1d518b123fefd16e00ac2e22084e781abb89c3089f7dc829f20fd9\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xa13bde2a8b00010d003c933cd20d11379c2fa99ae0349c4765bd81ddb7cb2eb8\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0x96ab608c8ed8b0363984868c5e42f5a4f22f2f9e67a6630ba174fb5be750c360\",\"license\":\"BUSL-1.1\"},\"contracts/vortex/CarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { ICarbonVortex } from \\\"./interfaces/ICarbonVortex.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { ICarbonController } from \\\"../carbon/interfaces/ICarbonController.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Utils } from \\\"../utility/Utils.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { MAX_GAP, PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\n\\ninterface IBancorNetwork {\\n function collectionByPool(Token pool) external view returns (address);\\n\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n uint256 sourceAmount,\\n uint256 minReturnAmount,\\n uint256 deadline,\\n address beneficiary\\n ) external payable returns (uint256);\\n}\\n\\n/**\\n * @dev CarbonVortex contract\\n */\\ncontract CarbonVortex is ICarbonVortex, Upgradeable, ReentrancyGuardUpgradeable, Utils {\\n using Address for address payable;\\n\\n ICarbonController private immutable _carbonController;\\n IBancorNetwork private immutable _bancorNetwork;\\n Token private immutable _bnt;\\n\\n uint256 private _totalBurned;\\n\\n // rewards percentage\\n uint256 private _rewardsPPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 2] private __gap;\\n\\n /**\\n * @dev a \\\"virtual\\\" constructor that is only used to set immutable state variables\\n */\\n constructor(\\n Token bnt,\\n ICarbonController carbonController,\\n IBancorNetwork bancorNetwork\\n ) validAddress(address(carbonController)) validAddress(Token.unwrap(bnt)) validAddress(address(bancorNetwork)) {\\n _carbonController = carbonController;\\n _bancorNetwork = bancorNetwork;\\n _bnt = bnt;\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() external initializer {\\n __CarbonVortex_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonVortex_init() internal onlyInitializing {\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonVortex_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonVortex_init_unchained() internal onlyInitializing {\\n _setRewardsPPM(100_000);\\n }\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function _postUpgrade(bytes calldata /* data*/) internal override {\\n _setRewardsPPM(20_000);\\n }\\n\\n /**\\n * @dev authorize the contract to receive the native token\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev perform various validations for the token array\\n */\\n modifier validateTokens(Token[] calldata tokens) {\\n _validateTokens(tokens);\\n _;\\n }\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function setRewardsPPM(uint256 newRewardsPPM) external onlyAdmin validFee(uint32(newRewardsPPM)) {\\n _setRewardsPPM(newRewardsPPM);\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function rewardsPPM() external view returns (uint256) {\\n return _rewardsPPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function totalBurned() external view returns (uint256) {\\n return _totalBurned;\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function availableTokens(Token token) external view returns (uint256) {\\n return _carbonController.accumulatedFees(token) + token.balanceOf(address(this));\\n }\\n\\n /**\\n * @inheritdoc ICarbonVortex\\n */\\n function execute(Token[] calldata tokens) external nonReentrant validateTokens(tokens) {\\n uint256 len = tokens.length;\\n\\n // allocate balances array for the tokens\\n uint256[] memory balances = new uint256[](len);\\n // allocate array for the reward amounts for caller\\n uint256[] memory rewardAmounts = new uint256[](len);\\n // cache rewardsPPM to save gas\\n uint256 rewardsPercentage = _rewardsPPM;\\n\\n // withdraw fees, load balances and reward amounts\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n // withdraw token fees\\n _carbonController.withdrawFees(tokens[i], type(uint256).max, address(this));\\n // get token balance\\n balances[i] = tokens[i].balanceOf(address(this));\\n // get reward amount for token\\n rewardAmounts[i] = MathEx.mulDivF(balances[i], rewardsPercentage, PPM_RESOLUTION);\\n }\\n\\n // convert tokens to BNT\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // skip token if no token balance or token is BNT - no need to swap in this case\\n if (balances[i] == 0 || token == _bnt) {\\n continue;\\n }\\n\\n // get trade amount for token\\n uint256 tradeAmount;\\n unchecked {\\n // safe because balances[i] >= rewardAmounts[i]\\n tradeAmount = balances[i] - rewardAmounts[i];\\n }\\n\\n // approve tokens for trading on Bancor Network V3\\n _setAllowance(token, tradeAmount);\\n\\n uint256 val = token.isNative() ? tradeAmount : 0;\\n\\n // swap token to BNT using Bancor Network V3\\n _bancorNetwork.tradeBySourceAmount{ value: val }(token, _bnt, tradeAmount, 1, block.timestamp, address(0));\\n }\\n\\n // allocate rewards to caller and burn the rest\\n _allocateRewards(msg.sender, tokens, rewardAmounts);\\n }\\n\\n /**\\n * @dev allocates the rewards to caller and burns the rest\\n */\\n function _allocateRewards(address sender, Token[] calldata tokens, uint256[] memory rewardAmounts) private {\\n // transfer the rewards to caller\\n uint256 len = tokens.length;\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n uint256 rewardAmount = rewardAmounts[i];\\n if (rewardAmount == 0) {\\n continue;\\n }\\n if (token.isNative()) {\\n // using a regular transfer here could revert due to exceeding the 2300 gas limit\\n // which is why we're using call instead (via sendValue)\\n payable(sender).sendValue(rewardAmount);\\n } else {\\n token.safeTransfer(sender, rewardAmount);\\n }\\n }\\n\\n // get the burn amount\\n uint256 burnAmount = _bnt.balanceOf(address(this));\\n\\n if (burnAmount > 0) {\\n // add to the total burned amount\\n _totalBurned += burnAmount;\\n // burn the tokens\\n _bnt.safeTransfer(Token.unwrap(_bnt), burnAmount);\\n // emit event\\n emit TokensBurned(sender, tokens, rewardAmounts, burnAmount);\\n }\\n }\\n\\n function _setRewardsPPM(uint256 newRewardsPPM) private {\\n uint256 prevRewardsPPM = _rewardsPPM;\\n\\n // return if the rewards percentage PPM is the same\\n if (prevRewardsPPM == newRewardsPPM) {\\n return;\\n }\\n\\n _rewardsPPM = newRewardsPPM;\\n\\n emit RewardsUpdated({ prevRewardsPPM: prevRewardsPPM, newRewardsPPM: newRewardsPPM });\\n }\\n\\n /**\\n * @dev set allowance to Bancor Network V3 to the max amount if it's less than the input amount\\n */\\n function _setAllowance(Token token, uint256 inputAmount) private {\\n if (token.isNative()) {\\n return;\\n }\\n uint256 allowance = token.allowance(address(this), address(_bancorNetwork));\\n if (allowance < inputAmount) {\\n // increase allowance to the max amount if allowance < inputAmount\\n token.safeIncreaseAllowance(address(_bancorNetwork), type(uint256).max - allowance);\\n }\\n }\\n\\n function _validateTokens(Token[] calldata tokens) private view {\\n uint len = tokens.length;\\n if (len == 0) {\\n revert InvalidTokenLength();\\n }\\n for (uint256 i = 0; i < len; i = uncheckedInc(i)) {\\n Token token = tokens[i];\\n // validate token has no duplicates\\n for (uint256 j = uncheckedInc(i); j < len; j = uncheckedInc(j)) {\\n if (token == tokens[j]) {\\n revert DuplicateToken();\\n }\\n }\\n // validate token can be traded on V3\\n if (token != _bnt && _bancorNetwork.collectionByPool(token) == address(0)) {\\n revert InvalidToken();\\n }\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7e8a625be66b775f76d0b094d594c263e845f819f84358140c3ba8479327f157\",\"license\":\"BUSL-1.1\"},\"contracts/vortex/interfaces/ICarbonVortex.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\n\\n/**\\n * @dev CarbonVortex interface\\n */\\ninterface ICarbonVortex is IUpgradeable {\\n error DuplicateToken();\\n error InvalidToken();\\n error InvalidTokenLength();\\n\\n /**\\n * @dev triggered after a successful burn is executed\\n */\\n event TokensBurned(\\n address indexed caller,\\n Token[] tokens,\\n uint256[] rewardAmounts,\\n uint256 burnAmount\\n );\\n\\n /**\\n * @dev triggered when the rewards ppm are updated\\n */\\n event RewardsUpdated(\\n uint256 prevRewardsPPM,\\n uint256 newRewardsPPM\\n );\\n\\n /**\\n * @dev returns the rewards percentage ppm\\n */\\n function rewardsPPM() external view returns (uint256);\\n\\n /**\\n * @dev returns the total amount burned\\n */\\n function totalBurned() external view returns (uint256);\\n\\n /**\\n * @dev returns the total available fees for the given token\\n */\\n function availableTokens(Token token) external view returns (uint256);\\n \\n /**\\n * @dev withdraws the fees of the provided tokens from Carbon\\n * @dev converts them along with the available contract token balance to BNT,\\n * @dev rewards the caller and burns the rest of the tokens\\n */\\n function execute(Token[] calldata tokens) external;\\n\\n /**\\n * @dev sets the rewards percentage ppm\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setRewardsPPM(uint256 newRewardsPercentagePPM) external;\\n}\\n\",\"keccak256\":\"0x2c8321b6f8fa10925cf7aee658cfde5ebde292c8802858a97d72fc3d1caa6c49\",\"license\":\"BUSL-1.1\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x645f48b84cb30d91cc7e6b01defb0d856edf73db11ac1f083455a776b428f979\",\"license\":\"BUSL-1.1\"}},\"version\":1}", - "bytecode": "0x60e06040523480156200001157600080fd5b5060405162002ac438038062002ac48339810160408190526200003491620000b9565b81620000408162000078565b836200004c8162000078565b82620000588162000078565b5050506001600160a01b03918216608052811660a0521660c0526200010d565b6001600160a01b038116620000a05760405163e6c4247b60e01b815260040160405180910390fd5b50565b6001600160a01b0381168114620000a057600080fd5b600080600060608486031215620000cf57600080fd5b8351620000dc81620000a3565b6020850151909350620000ef81620000a3565b60408501519092506200010281620000a3565b809150509250925092565b60805160a05160c05161294f620001756000396000818161078c0152818161086301528181610e6d015281816112be015261130a0152600081816108a901528181610ee001528181611166015261119901526000818161059d0152610b40015261294f6000f3fe60806040526004361061012d5760003560e01c806391d14854116100a5578063c7f5387411610074578063d547741f11610059578063d547741f1461037b578063d89135cd1461039b578063ebf80ff5146103b157600080fd5b8063c7f5387414610345578063ca15c8731461035b57600080fd5b806391d148541461029757806393867fb5146102dd57806394cb094714610310578063a217fddf1461033057600080fd5b80634c0a0dfa116100fc5780638129fc1c116100e15780638129fc1c1461022a5780638cd2403d1461023f5780639010d07c1461025f57600080fd5b80634c0a0dfa146101ee57806354fd4d501461020e57600080fd5b806301ffc9a714610139578063248a9ca31461016e5780632f2ff15d146101ac57806336568abe146101ce57600080fd5b3661013457005b600080fd5b34801561014557600080fd5b506101596101543660046124d0565b6103d1565b60405190151581526020015b60405180910390f35b34801561017a57600080fd5b5061019e610189366004612512565b60009081526065602052604090206001015490565b604051908152602001610165565b3480156101b857600080fd5b506101cc6101c7366004612540565b61042d565b005b3480156101da57600080fd5b506101cc6101e9366004612540565b610457565b3480156101fa57600080fd5b506101cc610209366004612570565b6104e8565b34801561021a57600080fd5b5060405160028152602001610165565b34801561023657600080fd5b506101cc610944565b34801561024b57600080fd5b506101cc61025a3660046125e5565b610a64565b34801561026b57600080fd5b5061027f61027a366004612645565b610ad4565b6040516001600160a01b039091168152602001610165565b3480156102a357600080fd5b506101596102b2366004612540565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156102e957600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509661019e565b34801561031c57600080fd5b5061019e61032b366004612667565b610af3565b34801561033c57600080fd5b5061019e600081565b34801561035157600080fd5b5061012e5461019e565b34801561036757600080fd5b5061019e610376366004612512565b610bb5565b34801561038757600080fd5b506101cc610396366004612540565b610bcc565b3480156103a757600080fd5b5061012d5461019e565b3480156103bd57600080fd5b506101cc6103cc366004612512565b610bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610427575061042782610c2e565b92915050565b60008281526065602052604090206001015461044881610cc5565b6104528383610ccf565b505050565b6001600160a01b03811633146104da5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6104e48282610cf1565b5050565b6104f0610d13565b81816104fc8282610d6c565b8260008167ffffffffffffffff81111561051857610518612684565b604051908082528060200260200182016040528015610541578160200160208202803683370190505b50905060008267ffffffffffffffff81111561055f5761055f612684565b604051908082528060200260200182016040528015610588578160200160208202803683370190505b5061012e5490915060005b8481101561072c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ba372c28a8a848181106105dc576105dc61269a565b90506020020160208101906105f19190612667565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260001960248201523060448201526064016020604051808303816000875af115801561065d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068191906126b0565b506106bc308a8a848181106106985761069861269a565b90506020020160208101906106ad9190612667565b6001600160a01b031690610f9e565b8482815181106106ce576106ce61269a565b6020026020010181815250506107078482815181106106ef576106ef61269a565b602002602001015183620f424063ffffffff16611045565b8382815181106107195761071961269a565b6020908102919091010152600101610593565b5060005b8481101561092757600089898381811061074c5761074c61269a565b90506020020160208101906107619190612667565b90508482815181106107755761077561269a565b6020026020010151600014806107bc57506107bc817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156107c7575061091f565b60008483815181106107db576107db61269a565b60200260200101518684815181106107f5576107f561269a565b602002602001015103905061080a8282611139565b600061081e836001600160a01b03166111d5565b61082957600061082b565b815b6040517fd3a4acd30000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260016064830152426084830152600060a48301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063d3a4acd390839060c40160206040518083038185885af11580156108f5573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061091a91906126b0565b505050505b600101610730565b50610934338989856111fc565b5050505050506104e4600160fb55565b600054610100900460ff16158080156109645750600054600160ff909116105b8061097e5750303b15801561097e575060005460ff166001145b6109f05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104d1565b6000805460ff191660011790558015610a13576000805461ff0019166101001790555b610a1b611391565b8015610a61576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60c954600090610a799061ffff1660016126df565b905061ffff8116600214610ab9576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff83161790556104528383611416565b6000828152609760205260408120610aec9083611421565b9392505050565b6000610b086001600160a01b03831630610f9e565b6040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab91906126b0565b61042791906126fa565b60008181526097602052604081206104279061142d565b600082815260656020526040902060010154610be781610cc5565b6104528383610cf1565b610c1b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611437565b80610c2581611493565b6104e4826114d6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061042757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610427565b610a618133611528565b610cd9828261159d565b6000828152609760205260409020610452908261163f565b610cfb8282611654565b600082815260976020526040902061045290826116d7565b600260fb5403610d655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260fb55565b806000819003610da8576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610f98576000848483818110610dc757610dc761269a565b9050602002016020810190610ddc9190612667565b9050600182015b83811015610e6657610e2782878784818110610e0157610e0161269a565b9050602002016020810190610e169190612667565b6001600160a01b0390811691161490565b15610e5e576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610de3565b50610e9e817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081169116141590565b8015610f5857506040517f9bca0e700000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690639bca0e7090602401602060405180830381865afa158015610f29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4d919061270d565b6001600160a01b0316145b15610f8f576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50600101610dab565b50505050565b6000610fa9836111d5565b15610fbf57506001600160a01b03811631610427565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015611021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec91906126b0565b600080600061105486866116ec565b91509150816000036110795783818161106f5761106f61272a565b0492505050610aec565b8382106110b2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110bf878787611727565b90506000806110cf858585611742565b91509150816000036110f7578681816110ea576110ea61272a565b0495505050505050610aec565b600087810388169061110a848484611772565b90506000611126838b816111205761112061272a565b046117af565b919091029b9a5050505050505050505050565b61114b826001600160a01b03166111d5565b15611154575050565b600061118a6001600160a01b038416307f00000000000000000000000000000000000000000000000000000000000000006117d7565b905081811015610452576104527f00000000000000000000000000000000000000000000000000000000000000006111c483600019612740565b6001600160a01b0386169190611885565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610427565b8160005b818110156112ae57600085858381811061121c5761121c61269a565b90506020020160208101906112319190612667565b905060008483815181106112475761124761269a565b60200260200101519050806000036112605750506112a6565b611272826001600160a01b03166111d5565b1561128f5761128a6001600160a01b038916826118ac565b6112a3565b6112a36001600160a01b03831689836119c5565b50505b600101611200565b5060006112e46001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630610f9e565b90508015611382578061012d60008282546112ff91906126fa565b9091555061133a90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03811690836119c5565b856001600160a01b03167f907848d27eec20126a73629db507f65182b8da8ba77d96a99ff9c952d65466e8868686856040516113799493929190612753565b60405180910390a25b505050505050565b600160fb55565b600054610100900460ff166113fc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611404611a2a565b61140c611aa5565b611414611b18565b565b6104e4614e206114d6565b6000610aec8383611b8f565b6000610427825490565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e4576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620f424063ffffffff82161115610a61576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e548181036114e5575050565b61012e82905560408051828152602081018490527fcd7c861d63893659123f817b192b8621ff1923a7c4589c260173cedcf9e986a6910160405180910390a15050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e45761155b81611bb9565b611566836020611bcb565b60405160200161157792919061280c565b60408051601f198184030181529082905262461bcd60e51b82526104d19160040161288d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e45760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610aec836001600160a01b038416611df4565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156104e45760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610aec836001600160a01b038416611e43565b60008060006116fb8585611f36565b9050848402808210611714579081900392509050611720565b60018183030393509150505b9250929050565b600081806117375761173761272a565b838509949350505050565b600080828410611758575083905081830361176a565b611763600186612740565b9150508183035b935093915050565b60008061179083808303816117895761178961272a565b0460010190565b90508284816117a1576117a161272a565b048186021795945050505050565b60006001815b60088110156117d057838202600203820291506001016117b5565b5092915050565b60006117e2846111d5565b156117ef57506000610aec565b836040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301528481166024830152919091169063dd62ed3e90604401602060405180830381865afa158015611859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187d91906126b0565b949350505050565b61188e836111d5565b1561189857505050565b6104526001600160a01b0384168383611f45565b804710156118fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104d1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611949576040519150601f19603f3d011682016040523d82523d6000602084013e61194e565b606091505b50509050806104525760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104d1565b806000036119d257505050565b6119db836111d5565b15611a16576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610f98573d6000803e3d6000fd5b6104526001600160a01b0384168383612084565b600054610100900460ff16611a955760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611a9d6120cd565b611414612138565b600054610100900460ff16611b105760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611414612205565b600054610100900460ff16611b835760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611414620186a06114d6565b6000826000018281548110611ba657611ba661269a565b9060005260206000200154905092915050565b60606104276001600160a01b03831660145b60606000611bda8360026128c0565b611be59060026126fa565b67ffffffffffffffff811115611bfd57611bfd612684565b6040519080825280601f01601f191660200182016040528015611c27576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c5e57611c5e61269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611cc157611cc161269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611cfd8460026128c0565b611d089060016126fa565b90505b6001811115611da5577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d4957611d4961269a565b1a60f81b828281518110611d5f57611d5f61269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611d9e816128d7565b9050611d0b565b508315610aec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d1565b6000818152600183016020526040812054611e3b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610427565b506000610427565b60008181526001830160205260408120548015611f2c576000611e67600183612740565b8554909150600090611e7b90600190612740565b9050818114611ee0576000866000018281548110611e9b57611e9b61269a565b9060005260206000200154905080876000018481548110611ebe57611ebe61269a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611ef157611ef16128ee565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610427565b6000915050610427565b60006000198284099392505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611fae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd291906126b0565b9050610f98847f095ea7b3000000000000000000000000000000000000000000000000000000008561200486866126fa565b6040516001600160a01b03909216602483015260448201526064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612270565b6040516001600160a01b0383166024820152604481018290526104529084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612020565b600054610100900460ff166114145760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b600054610100900460ff166121a35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b60c9805461ffff191660011790556121db7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612358565b6114147f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123a3565b600054610100900460ff1661138a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b60006122c5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123ad9092919063ffffffff16565b90508051600014806122e65750808060200190518101906122e69190612904565b6104525760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6104e48282610ccf565b606061187d848460008585600080866001600160a01b031685876040516123d49190612926565b60006040518083038185875af1925050503d8060008114612411576040519150601f19603f3d011682016040523d82523d6000602084013e612416565b606091505b509150915061242787838387612432565b979650505050505050565b606083156124a157825160000361249a576001600160a01b0385163b61249a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b508161187d565b61187d83838151156124b65781518083602001fd5b8060405162461bcd60e51b81526004016104d1919061288d565b6000602082840312156124e257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610aec57600080fd5b60006020828403121561252457600080fd5b5035919050565b6001600160a01b0381168114610a6157600080fd5b6000806040838503121561255357600080fd5b8235915060208301356125658161252b565b809150509250929050565b6000806020838503121561258357600080fd5b823567ffffffffffffffff8082111561259b57600080fd5b818501915085601f8301126125af57600080fd5b8135818111156125be57600080fd5b8660208260051b85010111156125d357600080fd5b60209290920196919550909350505050565b600080602083850312156125f857600080fd5b823567ffffffffffffffff8082111561261057600080fd5b818501915085601f83011261262457600080fd5b81358181111561263357600080fd5b8660208285010111156125d357600080fd5b6000806040838503121561265857600080fd5b50508035926020909101359150565b60006020828403121561267957600080fd5b8135610aec8161252b565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156126c257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b61ffff8181168382160190808211156117d0576117d06126c9565b80820180821115610427576104276126c9565b60006020828403121561271f57600080fd5b8151610aec8161252b565b634e487b7160e01b600052601260045260246000fd5b81810381811115610427576104276126c9565b6060808252810184905260008560808301825b878110156127965782356127798161252b565b6001600160a01b0316825260209283019290910190600101612766565b5060209150838103828501528086518083528383019150838801925060005b818110156127d1578351835292840192918401916001016127b5565b505080935050505082604083015295945050505050565b60005b838110156128035781810151838201526020016127eb565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128448160178501602088016127e8565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516128818160288401602088016127e8565b01602801949350505050565b60208152600082518060208401526128ac8160408501602087016127e8565b601f01601f19169190910160400192915050565b8082028115828204841417610427576104276126c9565b6000816128e6576128e66126c9565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561291657600080fd5b81518015158114610aec57600080fd5b600082516129388184602087016127e8565b919091019291505056fea164736f6c6343000813000a", - "deployedBytecode": "0x60806040526004361061012d5760003560e01c806391d14854116100a5578063c7f5387411610074578063d547741f11610059578063d547741f1461037b578063d89135cd1461039b578063ebf80ff5146103b157600080fd5b8063c7f5387414610345578063ca15c8731461035b57600080fd5b806391d148541461029757806393867fb5146102dd57806394cb094714610310578063a217fddf1461033057600080fd5b80634c0a0dfa116100fc5780638129fc1c116100e15780638129fc1c1461022a5780638cd2403d1461023f5780639010d07c1461025f57600080fd5b80634c0a0dfa146101ee57806354fd4d501461020e57600080fd5b806301ffc9a714610139578063248a9ca31461016e5780632f2ff15d146101ac57806336568abe146101ce57600080fd5b3661013457005b600080fd5b34801561014557600080fd5b506101596101543660046124d0565b6103d1565b60405190151581526020015b60405180910390f35b34801561017a57600080fd5b5061019e610189366004612512565b60009081526065602052604090206001015490565b604051908152602001610165565b3480156101b857600080fd5b506101cc6101c7366004612540565b61042d565b005b3480156101da57600080fd5b506101cc6101e9366004612540565b610457565b3480156101fa57600080fd5b506101cc610209366004612570565b6104e8565b34801561021a57600080fd5b5060405160028152602001610165565b34801561023657600080fd5b506101cc610944565b34801561024b57600080fd5b506101cc61025a3660046125e5565b610a64565b34801561026b57600080fd5b5061027f61027a366004612645565b610ad4565b6040516001600160a01b039091168152602001610165565b3480156102a357600080fd5b506101596102b2366004612540565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156102e957600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509661019e565b34801561031c57600080fd5b5061019e61032b366004612667565b610af3565b34801561033c57600080fd5b5061019e600081565b34801561035157600080fd5b5061012e5461019e565b34801561036757600080fd5b5061019e610376366004612512565b610bb5565b34801561038757600080fd5b506101cc610396366004612540565b610bcc565b3480156103a757600080fd5b5061012d5461019e565b3480156103bd57600080fd5b506101cc6103cc366004612512565b610bf1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610427575061042782610c2e565b92915050565b60008281526065602052604090206001015461044881610cc5565b6104528383610ccf565b505050565b6001600160a01b03811633146104da5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6104e48282610cf1565b5050565b6104f0610d13565b81816104fc8282610d6c565b8260008167ffffffffffffffff81111561051857610518612684565b604051908082528060200260200182016040528015610541578160200160208202803683370190505b50905060008267ffffffffffffffff81111561055f5761055f612684565b604051908082528060200260200182016040528015610588578160200160208202803683370190505b5061012e5490915060005b8481101561072c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ba372c28a8a848181106105dc576105dc61269a565b90506020020160208101906105f19190612667565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260001960248201523060448201526064016020604051808303816000875af115801561065d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068191906126b0565b506106bc308a8a848181106106985761069861269a565b90506020020160208101906106ad9190612667565b6001600160a01b031690610f9e565b8482815181106106ce576106ce61269a565b6020026020010181815250506107078482815181106106ef576106ef61269a565b602002602001015183620f424063ffffffff16611045565b8382815181106107195761071961269a565b6020908102919091010152600101610593565b5060005b8481101561092757600089898381811061074c5761074c61269a565b90506020020160208101906107619190612667565b90508482815181106107755761077561269a565b6020026020010151600014806107bc57506107bc817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b156107c7575061091f565b60008483815181106107db576107db61269a565b60200260200101518684815181106107f5576107f561269a565b602002602001015103905061080a8282611139565b600061081e836001600160a01b03166111d5565b61082957600061082b565b815b6040517fd3a4acd30000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260016064830152426084830152600060a48301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063d3a4acd390839060c40160206040518083038185885af11580156108f5573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061091a91906126b0565b505050505b600101610730565b50610934338989856111fc565b5050505050506104e4600160fb55565b600054610100900460ff16158080156109645750600054600160ff909116105b8061097e5750303b15801561097e575060005460ff166001145b6109f05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104d1565b6000805460ff191660011790558015610a13576000805461ff0019166101001790555b610a1b611391565b8015610a61576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b60c954600090610a799061ffff1660016126df565b905061ffff8116600214610ab9576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff83161790556104528383611416565b6000828152609760205260408120610aec9083611421565b9392505050565b6000610b086001600160a01b03831630610f9e565b6040517ffcf666640000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fcf6666490602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab91906126b0565b61042791906126fa565b60008181526097602052604081206104279061142d565b600082815260656020526040902060010154610be781610cc5565b6104528383610cf1565b610c1b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611437565b80610c2581611493565b6104e4826114d6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061042757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610427565b610a618133611528565b610cd9828261159d565b6000828152609760205260409020610452908261163f565b610cfb8282611654565b600082815260976020526040902061045290826116d7565b600260fb5403610d655760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260fb55565b806000819003610da8576040517f7dee3bcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610f98576000848483818110610dc757610dc761269a565b9050602002016020810190610ddc9190612667565b9050600182015b83811015610e6657610e2782878784818110610e0157610e0161269a565b9050602002016020810190610e169190612667565b6001600160a01b0390811691161490565b15610e5e576040517f464e3f6a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610de3565b50610e9e817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081169116141590565b8015610f5857506040517f9bca0e700000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690639bca0e7090602401602060405180830381865afa158015610f29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4d919061270d565b6001600160a01b0316145b15610f8f576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50600101610dab565b50505050565b6000610fa9836111d5565b15610fbf57506001600160a01b03811631610427565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015611021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec91906126b0565b600080600061105486866116ec565b91509150816000036110795783818161106f5761106f61272a565b0492505050610aec565b8382106110b2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110bf878787611727565b90506000806110cf858585611742565b91509150816000036110f7578681816110ea576110ea61272a565b0495505050505050610aec565b600087810388169061110a848484611772565b90506000611126838b816111205761112061272a565b046117af565b919091029b9a5050505050505050505050565b61114b826001600160a01b03166111d5565b15611154575050565b600061118a6001600160a01b038416307f00000000000000000000000000000000000000000000000000000000000000006117d7565b905081811015610452576104527f00000000000000000000000000000000000000000000000000000000000000006111c483600019612740565b6001600160a01b0386169190611885565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610427565b8160005b818110156112ae57600085858381811061121c5761121c61269a565b90506020020160208101906112319190612667565b905060008483815181106112475761124761269a565b60200260200101519050806000036112605750506112a6565b611272826001600160a01b03166111d5565b1561128f5761128a6001600160a01b038916826118ac565b6112a3565b6112a36001600160a01b03831689836119c5565b50505b600101611200565b5060006112e46001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630610f9e565b90508015611382578061012d60008282546112ff91906126fa565b9091555061133a90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03811690836119c5565b856001600160a01b03167f907848d27eec20126a73629db507f65182b8da8ba77d96a99ff9c952d65466e8868686856040516113799493929190612753565b60405180910390a25b505050505050565b600160fb55565b600054610100900460ff166113fc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611404611a2a565b61140c611aa5565b611414611b18565b565b6104e4614e206114d6565b6000610aec8383611b8f565b6000610427825490565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e4576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620f424063ffffffff82161115610a61576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012e548181036114e5575050565b61012e82905560408051828152602081018490527fcd7c861d63893659123f817b192b8621ff1923a7c4589c260173cedcf9e986a6910160405180910390a15050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e45761155b81611bb9565b611566836020611bcb565b60405160200161157792919061280c565b60408051601f198184030181529082905262461bcd60e51b82526104d19160040161288d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104e45760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610aec836001600160a01b038416611df4565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156104e45760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610aec836001600160a01b038416611e43565b60008060006116fb8585611f36565b9050848402808210611714579081900392509050611720565b60018183030393509150505b9250929050565b600081806117375761173761272a565b838509949350505050565b600080828410611758575083905081830361176a565b611763600186612740565b9150508183035b935093915050565b60008061179083808303816117895761178961272a565b0460010190565b90508284816117a1576117a161272a565b048186021795945050505050565b60006001815b60088110156117d057838202600203820291506001016117b5565b5092915050565b60006117e2846111d5565b156117ef57506000610aec565b836040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301528481166024830152919091169063dd62ed3e90604401602060405180830381865afa158015611859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187d91906126b0565b949350505050565b61188e836111d5565b1561189857505050565b6104526001600160a01b0384168383611f45565b804710156118fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104d1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611949576040519150601f19603f3d011682016040523d82523d6000602084013e61194e565b606091505b50509050806104525760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104d1565b806000036119d257505050565b6119db836111d5565b15611a16576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610f98573d6000803e3d6000fd5b6104526001600160a01b0384168383612084565b600054610100900460ff16611a955760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611a9d6120cd565b611414612138565b600054610100900460ff16611b105760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611414612205565b600054610100900460ff16611b835760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b611414620186a06114d6565b6000826000018281548110611ba657611ba661269a565b9060005260206000200154905092915050565b60606104276001600160a01b03831660145b60606000611bda8360026128c0565b611be59060026126fa565b67ffffffffffffffff811115611bfd57611bfd612684565b6040519080825280601f01601f191660200182016040528015611c27576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c5e57611c5e61269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611cc157611cc161269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611cfd8460026128c0565b611d089060016126fa565b90505b6001811115611da5577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d4957611d4961269a565b1a60f81b828281518110611d5f57611d5f61269a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611d9e816128d7565b9050611d0b565b508315610aec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d1565b6000818152600183016020526040812054611e3b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610427565b506000610427565b60008181526001830160205260408120548015611f2c576000611e67600183612740565b8554909150600090611e7b90600190612740565b9050818114611ee0576000866000018281548110611e9b57611e9b61269a565b9060005260206000200154905080876000018481548110611ebe57611ebe61269a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611ef157611ef16128ee565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610427565b6000915050610427565b60006000198284099392505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611fae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd291906126b0565b9050610f98847f095ea7b3000000000000000000000000000000000000000000000000000000008561200486866126fa565b6040516001600160a01b03909216602483015260448201526064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612270565b6040516001600160a01b0383166024820152604481018290526104529084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612020565b600054610100900460ff166114145760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b600054610100900460ff166121a35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b60c9805461ffff191660011790556121db7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612358565b6114147f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123a3565b600054610100900460ff1661138a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016104d1565b60006122c5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123ad9092919063ffffffff16565b90508051600014806122e65750808060200190518101906122e69190612904565b6104525760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6104e48282610ccf565b606061187d848460008585600080866001600160a01b031685876040516123d49190612926565b60006040518083038185875af1925050503d8060008114612411576040519150601f19603f3d011682016040523d82523d6000602084013e612416565b606091505b509150915061242787838387612432565b979650505050505050565b606083156124a157825160000361249a576001600160a01b0385163b61249a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b508161187d565b61187d83838151156124b65781518083602001fd5b8060405162461bcd60e51b81526004016104d1919061288d565b6000602082840312156124e257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610aec57600080fd5b60006020828403121561252457600080fd5b5035919050565b6001600160a01b0381168114610a6157600080fd5b6000806040838503121561255357600080fd5b8235915060208301356125658161252b565b809150509250929050565b6000806020838503121561258357600080fd5b823567ffffffffffffffff8082111561259b57600080fd5b818501915085601f8301126125af57600080fd5b8135818111156125be57600080fd5b8660208260051b85010111156125d357600080fd5b60209290920196919550909350505050565b600080602083850312156125f857600080fd5b823567ffffffffffffffff8082111561261057600080fd5b818501915085601f83011261262457600080fd5b81358181111561263357600080fd5b8660208285010111156125d357600080fd5b6000806040838503121561265857600080fd5b50508035926020909101359150565b60006020828403121561267957600080fd5b8135610aec8161252b565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156126c257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b61ffff8181168382160190808211156117d0576117d06126c9565b80820180821115610427576104276126c9565b60006020828403121561271f57600080fd5b8151610aec8161252b565b634e487b7160e01b600052601260045260246000fd5b81810381811115610427576104276126c9565b6060808252810184905260008560808301825b878110156127965782356127798161252b565b6001600160a01b0316825260209283019290910190600101612766565b5060209150838103828501528086518083528383019150838801925060005b818110156127d1578351835292840192918401916001016127b5565b505080935050505082604083015295945050505050565b60005b838110156128035781810151838201526020016127eb565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128448160178501602088016127e8565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516128818160288401602088016127e8565b01602801949350505050565b60208152600082518060208401526128ac8160408501602087016127e8565b601f01601f19169190910160400192915050565b8082028115828204841417610427576104276126c9565b6000816128e6576128e66126c9565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561291657600080fd5b81518015158114610aec57600080fd5b600082516129388184602087016127e8565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "details": "CarbonVortex contract", - "events": { - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RewardsUpdated(uint256,uint256)": { - "details": "triggered when the rewards ppm are updated" - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "TokensBurned(address,address[],uint256[],uint256)": { - "details": "triggered after a successful burn is executed" - } - }, - "kind": "dev", - "methods": { - "availableTokens(address)": { - "details": "returns the total available fees for the given token" - }, - "constructor": { - "details": "a \"virtual\" constructor that is only used to set immutable state variables" - }, - "execute(address[])": { - "details": "withdraws the fees of the provided tokens from Carbonconverts them along with the available contract token balance to BNT,rewards the caller and burns the rest of the tokens" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "rewardsPPM()": { - "details": "returns the rewards percentage ppm" - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "setRewardsPPM(uint256)": { - "details": "sets the rewards percentage ppm requirements: - the caller must be the admin of the contract" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "totalBurned()": { - "details": "returns the total amount burned" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2445, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2718, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)" - }, - { - "astId": 143, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 17697, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 17703, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 891, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256" - }, - { - "astId": 960, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 18024, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_totalBurned", - "offset": 0, - "slot": "301", - "type": "t_uint256" - }, - { - "astId": 18026, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_rewardsPPM", - "offset": 0, - "slot": "302", - "type": "t_uint256" - }, - { - "astId": 18032, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "__gap", - "offset": 0, - "slot": "303", - "type": "t_array(t_uint256)48_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)48_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[48]", - "numberOfBytes": "1536" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)5569_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)5569_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)5569_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 5568, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)5254_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)5254_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 5249, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 5253, - "contract": "contracts/vortex/CarbonVortex.sol:CarbonVortex", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/CarbonVortex_Proxy.json b/src/contracts/ethereum/CarbonVortex_Proxy.json deleted file mode 100644 index 12296e9..0000000 --- a/src/contracts/ethereum/CarbonVortex_Proxy.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "transactionIndex": 47, - "gasUsed": "833372", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000040000000000800200000020000000000000000000000080000000000000000000200004000000000000008000000008800000000000000000000000000000100000000000000000000000000000000000000a0000000000000800008000000000000000000100000000400000100000000000000001000000000080020000020000000000000000000040000000000000400000100000000000020000000000000000000000080020000000000000000000000000000000000000000", - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a", - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "logs": [ - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000004610fc898f94ac0b6bfe2b836fd59f6d03195445" - ], - "data": "0x", - "logIndex": 131, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 132, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 133, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0xcd45ee15b111450ac669d57182e8b04590f172b8518828d9d4d7befb4f14de98" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000056bc75e2d63100000", - "logIndex": 134, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 135, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - }, - { - "transactionIndex": 47, - "blockNumber": 17087475, - "transactionHash": "0xc26ab98d01d3d8d8fcde878e09e69497b3418d74544ec3ee8f600ff6ed320b7e", - "address": "0xba7d1581Db6248DC9177466a328BF457703c8f84", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 136, - "blockHash": "0x608dc8953635ceb9e6908fea1cd7b3f327eaad4f434c74b916468ada8ae80a1a" - } - ], - "blockNumber": 17087475, - "cumulativeGasUsed": "5903516", - "status": 1, - "byzantium": true - }, - "args": [ - "0x4610FC898f94aC0B6Bfe2b836fD59F6d03195445", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x8129fc1c" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/ProxyAdmin.json b/src/contracts/ethereum/ProxyAdmin.json deleted file mode 100644 index 064bf34..0000000 --- a/src/contracts/ethereum/ProxyAdmin.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "address": "0x64287956B8b587670d4D9B94378177F6c52F0034", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0xc96f8b31d41653239ab0bb81d36f9ba348072a341beecfaeff5b89348949dbd8", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x64287956B8b587670d4D9B94378177F6c52F0034", - "transactionIndex": 51, - "gasUsed": "483751", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000008000000000000000000020400000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000020000000000000000000000000020000000000000000000000000000000000000000", - "blockHash": "0xb44454cef3d85f4d1f912199aefe7cd480db23c748ce4c145c13b3342a774a60", - "transactionHash": "0xc96f8b31d41653239ab0bb81d36f9ba348072a341beecfaeff5b89348949dbd8", - "logs": [ - { - "transactionIndex": 51, - "blockNumber": 17087121, - "transactionHash": "0xc96f8b31d41653239ab0bb81d36f9ba348072a341beecfaeff5b89348949dbd8", - "address": "0x64287956B8b587670d4D9B94378177F6c52F0034", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 98, - "blockHash": "0xb44454cef3d85f4d1f912199aefe7cd480db23c748ce4c145c13b3342a774a60" - } - ], - "blockNumber": 17087121, - "cumulativeGasUsed": "4418397", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "9bdd811a5d3ce6d3824cc7ba53f70bc7", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract TransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@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/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"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/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"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/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n TransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x33b8603bfbef7f33d9308b79c79aa3db7eb19525fd1addd764285e834ca275d7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"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/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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"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\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "devdoc": { - "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", - "kind": "dev", - "methods": { - "changeProxyAdmin(address,address)": { - "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." - }, - "getProxyAdmin(address)": { - "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "getProxyImplementation(address)": { - "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "upgrade(address,address)": { - "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." - }, - "upgradeAndCall(address,address,bytes)": { - "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 5647, - "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/Voucher.json b/src/contracts/ethereum/Voucher.json deleted file mode 100644 index 3417ec2..0000000 --- a/src/contracts/ethereum/Voucher.json +++ /dev/null @@ -1,1094 +0,0 @@ -{ - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleMinter", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "transactionIndex": 167, - "gasUsed": "995176", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000020000000000000000000000080000000004000000000200004000000000000008000000008000000000400000000000000000000100080000000000000000000000000000000000a0000000000000800008000000000000000000000000000400000000000000000000001000000000010040000020000000000000000000040000000000000408000100000000024020000000000000000000000000020010000000000000000000000000000000000000", - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20", - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "logs": [ - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000c6b2f9b6bf3521308fb9360e4a6fe05f63953997" - ], - "data": "0x", - "logIndex": 247, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 248, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 249, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0xaeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b601461", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 250, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 251, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 252, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - } - ], - "blockNumber": 17087131, - "cumulativeGasUsed": "12521094", - "status": 1, - "byzantium": true - }, - "args": [ - "0xC6B2F9B6bF3521308Fb9360e4a6fe05F63953997", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "initialize", - "args": [ - true, - "ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn", - "" - ] - }, - "implementation": "0xC6B2F9B6bF3521308Fb9360e4a6fe05F63953997", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/Voucher_Implementation.json b/src/contracts/ethereum/Voucher_Implementation.json deleted file mode 100644 index 11f01ca..0000000 --- a/src/contracts/ethereum/Voucher_Implementation.json +++ /dev/null @@ -1,1371 +0,0 @@ -{ - "address": "0xC6B2F9B6bF3521308Fb9360e4a6fe05F63953997", - "abi": [ - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleMinter", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0x06d8684b0134433f9a9db9f67415ad901ea6362bfb38bdafc19acd65c45a8b39", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0xC6B2F9B6bF3521308Fb9360e4a6fe05F63953997", - "transactionIndex": 60, - "gasUsed": "2723915", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x764a6de38fb57346c99f3a347525fff02aa41318b394089af9301b33b64d3ddd", - "transactionHash": "0x06d8684b0134433f9a9db9f67415ad901ea6362bfb38bdafc19acd65c45a8b39", - "logs": [], - "blockNumber": 17087124, - "cumulativeGasUsed": "7097912", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "9bdd811a5d3ce6d3824cc7ba53f70bc7", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"BaseExtensionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"UseGlobalURIUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleMinter\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"setBaseExtension\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"tokensByOwner\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"useGlobalURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseExtensionUpdated(string)\":{\"details\":\"triggered when updating the baseExtension\"},\"BaseURIUpdated(string)\":{\"details\":\"triggered when updating the baseURI\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"UseGlobalURIUpdated(bool)\":{\"details\":\"triggered when updating useGlobalURI\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"destroys the voucher token for the given strategyId requirements: - the caller must have the ROLE_MINTER privilege\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(bool,string,string)\":{\"details\":\"fully initializes the contract and its parents\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address,uint256)\":{\"details\":\"creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must have the ROLE_MINTER privilege\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"roleMinter()\":{\"details\":\"returns the minter role\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseExtension(string)\":{\"details\":\"sets the base extension requirements: - the caller must be the admin of this contract\"},\"setBaseURI(string)\":{\"details\":\"sets the base URI requirements: - the caller must be the admin of this contract\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens\"},\"tokensByOwner(address,uint256,uint256)\":{\"details\":\"returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"useGlobalURI(bool)\":{\"details\":\"sets the useGlobalURI flag requirements: - the caller must be the admin of this contract\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/voucher/Voucher.sol\":\"Voucher\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xe8f27a3e3e25067334e76799f03d4de6d8f8535c3fc4806468228a9ebd5de51a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x121966b3220d263a6669dcf59c1254bd48ed237adf4d8a595add70a7927eada1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"./extensions/IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\\n using AddressUpgradeable for address;\\n using StringsUpgradeable 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 function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\\n return\\n interfaceId == type(IERC721Upgradeable).interfaceId ||\\n interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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 = ERC721Upgradeable.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 = ERC721Upgradeable.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721ReceiverUpgradeable.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\\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 /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0xac29c453f4cf43afe4c9599374b6e1ed493c18644d814554e8a5969aaa6f3486\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.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 IERC721ReceiverUpgradeable {\\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\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.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/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\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\":\"0x2c0b89cef83f353c6f9488c013d8a5968587ffdd6dfc26aad53774214b97e229\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.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 \\\"../IERC721Upgradeable.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 IERC721MetadataUpgradeable is IERC721Upgradeable {\\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\",\"keccak256\":\"0x95a471796eb5f030fdc438660bebec121ad5d063763e64d92376ffb4b5ce8b70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.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 AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\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 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\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.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 MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\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\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x4807db844a856813048b5af81a764fdd25a0ae8876a3132593e8d21ddc6b607c\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"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/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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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/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/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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"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/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\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xc3ff3f5c4584e1d9a483ad7ced51ab64523201f4e3d3c65293e4ca8aeb77a961\",\"license\":\"MIT\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x5877f3f23877d040294d2fad57e36b933a9b44efccc49c03218723d8e71d0062\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x80e0622d62d1415b8e19109151b13705e5b593ffe4fa1c39ea91b6eb27cfd760\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3e376fff44513f87ffb6359969ad0bd3221651c5c64f5458d5aba36d095cb155\",\"license\":\"BUSL-1.1\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // allows execution by the caller only\\n modifier only(address caller) {\\n _only(caller);\\n\\n _;\\n }\\n\\n function _only(address caller) internal view {\\n if (msg.sender != caller) {\\n revert AccessDenied();\\n }\\n }\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa67983db1c46f6883a5f79bb838a9653cd0dd8699a578044264fc5fad11b682b\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xa13bde2a8b00010d003c933cd20d11379c2fa99ae0349c4765bd81ddb7cb2eb8\",\"license\":\"BUSL-1.1\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0x96ab608c8ed8b0363984868c5e42f5a4f22f2f9e67a6630ba174fb5be750c360\",\"license\":\"BUSL-1.1\"},\"contracts/voucher/Voucher.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport { IERC165Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\\\";\\nimport { ERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Utils, InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nimport { IVoucher } from \\\"./interfaces/IVoucher.sol\\\";\\n\\ncontract Voucher is IVoucher, Upgradeable, ERC721Upgradeable, Utils {\\n using Strings for uint256;\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n error BatchNotSupported();\\n\\n // the minter role is required to mint/burn\\n bytes32 private constant ROLE_MINTER = keccak256(\\\"ROLE_MINTER\\\");\\n\\n // a flag used to toggle between a unique URI per token / one global URI for all tokens\\n bool private _useGlobalURI;\\n\\n // the prefix of a dynamic URI representing a single token\\n string private __baseURI;\\n\\n // the suffix of a dynamic URI for e.g. `.json`\\n string private _baseExtension;\\n\\n // a mapping between an owner to its tokenIds\\n mapping(address => EnumerableSet.UintSet) internal _ownedTokens;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 4] private __gap;\\n\\n /**\\n @dev triggered when updating useGlobalURI\\n */\\n event UseGlobalURIUpdated(bool newUseGlobalURI);\\n\\n /**\\n * @dev triggered when updating the baseURI\\n */\\n event BaseURIUpdated(string newBaseURI);\\n\\n /**\\n * @dev triggered when updating the baseExtension\\n */\\n event BaseExtensionUpdated(string newBaseExtension);\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) external initializer {\\n __Voucher_init(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Voucher_init(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n __Upgradeable_init();\\n __ERC721_init(\\\"Carbon Automated Trading Strategy\\\", \\\"CARBON-STRAT\\\");\\n\\n __Voucher_init_unchained(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Voucher_init_unchained(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n // set up administrative roles\\n _setRoleAdmin(ROLE_MINTER, ROLE_ADMIN);\\n\\n _useGlobalURI = newUseGlobalURI;\\n __baseURI = newBaseURI;\\n _baseExtension = newBaseExtension;\\n }\\n\\n /**\\n * @inheritdoc IERC165Upgradeable\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, IERC165Upgradeable) returns (bool) {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 1;\\n }\\n\\n /**\\n * @dev returns the minter role\\n */\\n function roleMinter() external pure returns (bytes32) {\\n return ROLE_MINTER;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function mint(address owner, uint256 tokenId) external onlyRoleMember(ROLE_MINTER) {\\n _safeMint(owner, tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function burn(uint256 tokenId) external onlyRoleMember(ROLE_MINTER) {\\n _burn(tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view validAddress(owner) returns (uint256[] memory) {\\n EnumerableSet.UintSet storage tokenIds = _ownedTokens[owner];\\n uint256 allLength = tokenIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last valid value\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n uint256[] memory result = new uint256[](resultLength);\\n for (uint256 i = 0; i < resultLength; i++) {\\n result[i] = tokenIds.at(startIndex + i);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher,\\n * or a URI of a global json used for all tokens\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n string memory baseURI = _baseURI();\\n if (_useGlobalURI) {\\n return baseURI;\\n }\\n\\n if (bytes(baseURI).length > 0) {\\n return string(abi.encodePacked(baseURI, tokenId.toString(), _baseExtension));\\n }\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev sets the base URI\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseURI(string memory newBaseURI) public onlyAdmin {\\n __baseURI = newBaseURI;\\n\\n emit BaseURIUpdated(newBaseURI);\\n }\\n\\n /**\\n * @dev sets the base extension\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseExtension(string memory newBaseExtension) public onlyAdmin {\\n _baseExtension = newBaseExtension;\\n\\n emit BaseExtensionUpdated(newBaseExtension);\\n }\\n\\n /**\\n * @dev sets the useGlobalURI flag\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function useGlobalURI(bool newUseGlobalURI) public onlyAdmin {\\n if (_useGlobalURI == newUseGlobalURI) {\\n return;\\n }\\n\\n _useGlobalURI = newUseGlobalURI;\\n emit UseGlobalURIUpdated(newUseGlobalURI);\\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`, `tokenId`\\n */\\n function _baseURI() internal view virtual override returns (string memory) {\\n return __baseURI;\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n revert BatchNotSupported();\\n }\\n\\n if (from == address(0)) {\\n _ownedTokens[to].add(firstTokenId);\\n } else if (from != to) {\\n _ownedTokens[from].remove(firstTokenId);\\n }\\n if (to == address(0)) {\\n _ownedTokens[from].remove(firstTokenId);\\n } else if (to != from) {\\n _ownedTokens[to].add(firstTokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x958e0d28c33c60c769fe7283cf1b35a927352f20f39eb7b98d8c39b89c40cb7f\",\"license\":\"BUSL-1.1\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must have the ROLE_MINTER privilege\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x645f48b84cb30d91cc7e6b01defb0d856edf73db11ac1f083455a776b428f979\",\"license\":\"BUSL-1.1\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613074806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806355f804b31161010f578063a217fddf116100a2578063ca15c87311610071578063ca15c87314610497578063d547741f146104aa578063da3ef23f146104bd578063e985e9c5146104d057600080fd5b8063a217fddf14610456578063a22cb4651461045e578063b88d4fde14610471578063c87b56dd1461048457600080fd5b80639010d07c116100de5780639010d07c146103dc57806391d14854146103ef57806393867fb51461042857806395d89b411461044e57600080fd5b806355f804b3146103905780636352211e146103a357806370a08231146103b65780638cd2403d146103c957600080fd5b806336568abe1161018757806343198ac41161015657806343198ac41461032857806349ade0961461034857806351f13b831461035b57806354fd4d501461038157600080fd5b806336568abe146102dc57806340c10f19146102ef57806342842e0e1461030257806342966c681461031557600080fd5b806323b872dd116101c357806323b872dd14610272578063248a9ca3146102855780632c8e0415146102b65780632f2ff15d146102c957600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b6102086102033660046127fc565b61050d565b60405190151581526020015b60405180910390f35b61022561051e565b6040516102149190612869565b61024561024036600461287c565b6105b0565b6040516001600160a01b039091168152602001610214565b61027061026b3660046128b1565b6105d7565b005b6102706102803660046128db565b61070d565b6102a861029336600461287c565b60009081526065602052604090206001015490565b604051908152602001610214565b6102706102c43660046129d3565b610794565b6102706102d7366004612a47565b6108ba565b6102706102ea366004612a47565b6108df565b6102706102fd3660046128b1565b61096b565b6102706103103660046128db565b6109a0565b61027061032336600461287c565b6109bb565b61033b610336366004612a73565b6109ef565b6040516102149190612aa6565b610270610356366004612aea565b610b1f565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014616102a8565b60405160018152602001610214565b61027061039e366004612b05565b610ba4565b6102456103b136600461287c565b610c0b565b6102a86103c4366004612b3a565b610c70565b6102706103d7366004612b55565b610d0a565b6102456103ea366004612bc7565b610d75565b6102086103fd366004612a47565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102a8565b610225610d94565b6102a8600081565b61027061046c366004612be9565b610da3565b61027061047f366004612c13565b610dae565b61022561049236600461287c565b610e36565b6102a86104a536600461287c565b610eb3565b6102706104b8366004612a47565b610eca565b6102706104cb366004612b05565b610eef565b6102086104de366004612c8f565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b600061051882610f56565b92915050565b606060fb805461052d90612cb9565b80601f016020809104026020016040519081016040528092919081815260200182805461055990612cb9565b80156105a65780601f1061057b576101008083540402835291602001916105a6565b820191906000526020600020905b81548152906001019060200180831161058957829003601f168201915b5050505050905090565b60006105bb82610fc8565b50600090815260ff60205260409020546001600160a01b031690565b60006105e282610c0b565b9050806001600160a01b0316836001600160a01b0316036106705760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061068c575061068c81336104de565b6106fe5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610667565b610708838361102c565b505050565b61071733826110a7565b6107895760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610667565b610708838383611127565b600054610100900460ff16158080156107b45750600054600160ff909116105b806107ce5750303b1580156107ce575060005460ff166001145b6108405760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610667565b6000805460ff191660011790558015610863576000805461ff0019166101001790555b61086e84848461136a565b80156108b4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108d58161143f565b6107088383611449565b6001600160a01b038116331461095d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610667565b610967828261146b565b5050565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b601461610996813361148d565b61070883836114e9565b61070883838360405180602001604052806000815250610dae565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014616109e6813361148d565b61096782611503565b6060836109fb816115b3565b6001600160a01b03851660009081526101306020526040812090610a1e826115f3565b9050841580610a2c57508085115b15610a35578094505b84861115610a6f576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a7b8787612d09565b905060008167ffffffffffffffff811115610a9857610a98612927565b604051908082528060200260200182016040528015610ac1578160200160208202803683370190505b50905060005b82811015610b1257610ae3610adc828b612d1c565b86906115fd565b828281518110610af557610af5612d2f565b602090810291909101015280610b0a81612d45565b915050610ac7565b5098975050505050505050565b610b497f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012d5460ff16151581151514610ba15761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a15b50565b610bce7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012e610bdb8282612dad565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b989190612869565b600081815260fd60205260408120546001600160a01b0316806105185760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610667565b60006001600160a01b038216610cee5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610667565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610d1f9061ffff166001612e6d565b905061ffff8116600114610d5f576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d8d90836115fd565b9392505050565b606060fc805461052d90612cb9565b610967338383611609565b610db833836110a7565b610e2a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610667565b6108b4848484846116d8565b6060610e4182610fc8565b6000610e4b611761565b61012d5490915060ff1615610e605792915050565b805115610e9d5780610e7184611771565b61012f604051602001610e8693929190612e88565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b6000818152609760205260408120610518906115f3565b600082815260656020526040902060010154610ee58161143f565b610708838361146b565b610f197f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012f610f268282612dad565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b989190612869565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610fb957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610518575061051882611811565b600081815260fd60205260409020546001600160a01b0316610ba15760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610667565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061106e82610c0b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806110b383610c0b565b9050806001600160a01b0316846001600160a01b031614806110fb57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b8061111f5750836001600160a01b0316611114846105b0565b6001600160a01b0316145b949350505050565b826001600160a01b031661113a82610c0b565b6001600160a01b0316146111b65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610667565b6001600160a01b0382166112315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610667565b61123e838383600161184f565b826001600160a01b031661125182610c0b565b6001600160a01b0316146112cd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610667565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166113d55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b6113dd611979565b611434604051806060016040528060218152602001613047602191396040518060400160405280600c81526020017f434152424f4e2d535452415400000000000000000000000000000000000000008152506119f6565b610708838383611a6b565b610ba18133611b4a565b6114538282611bbf565b60008281526097602052604090206107089082611c61565b6114758282611c76565b60008281526097602052604090206107089082611cf9565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610967576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610967828260405180602001604052806000815250611d0e565b600061150e82610c0b565b905061151e81600084600161184f565b61152782610c0b565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b038116610ba1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610518825490565b6000610d8d8383611d97565b816001600160a01b0316836001600160a01b03160361166a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610667565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6116e3848484611127565b6116ef84848484611dc1565b6108b45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b606061012e805461052d90612cb9565b6060600061177e83611f4a565b600101905060008167ffffffffffffffff81111561179e5761179e612927565b6040519080825280601f01601f1916602001820160405280156117c8576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846117d257509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061051857506105188261202c565b600181111561188a576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166118c1576001600160a01b0383166000908152610130602052604090206118bb9083612093565b506118ff565b826001600160a01b0316846001600160a01b0316146118ff576001600160a01b0384166000908152610130602052604090206118fd908361209f565b505b6001600160a01b038316611936576001600160a01b038416600090815261013060205260409020611930908361209f565b506108b4565b836001600160a01b0316836001600160a01b0316146108b4576001600160a01b0383166000908152610130602052604090206119729083612093565b5050505050565b600054610100900460ff166119e45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b6119ec6120ab565b6119f4612116565b565b600054610100900460ff16611a615760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b61096782826121e3565b600054610100900460ff16611ad65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b611b207faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014617f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096612267565b61012d805460ff191684151517905561012e611b3c8382612dad565b5061012f6108b48282612dad565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661096757611b7d816122b2565b611b888360206122c4565b604051602001611b99929190612f28565b60408051601f198184030181529082905262461bcd60e51b825261066791600401612869565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109675760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c1d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d8d836001600160a01b0384166124ed565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109675760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d8d836001600160a01b03841661253c565b611d188383612636565b611d256000848484611dc1565b6107085760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b6000826000018281548110611dae57611dae612d2f565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611f3f576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e1e903390899088908890600401612fa9565b6020604051808303816000875af1925050508015611e59575060408051601f3d908101601f19168201909252611e5691810190612fe5565b60015b611f0c573d808015611e87576040519150601f19603f3d011682016040523d82523d6000602084013e611e8c565b606091505b508051600003611f045760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b805181602001fd5b6001600160e01b0319167f150b7a020000000000000000000000000000000000000000000000000000000014905061111f565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611f93577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310611fbf576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611fdd57662386f26fc10000830492506010015b6305f5e1008310611ff5576305f5e100830492506008015b612710831061200957612710830492506004015b6064831061201b576064830492506002015b600a83106105185760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061051857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610518565b6000610d8d83836124ed565b6000610d8d838361253c565b600054610100900460ff166119f45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b600054610100900460ff166121815760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b60c9805461ffff191660011790556121b97f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612267565b6119f47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336127dc565b600054610100900460ff1661224e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b60fb61225a8382612dad565b5060fc6107088282612dad565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60606105186001600160a01b03831660145b606060006122d3836002613002565b6122de906002612d1c565b67ffffffffffffffff8111156122f6576122f6612927565b6040519080825280601f01601f191660200182016040528015612320576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061235757612357612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123ba576123ba612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006123f6846002613002565b612401906001612d1c565b90505b600181111561249e577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061244257612442612d2f565b1a60f81b82828151811061245857612458612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361249781613019565b9050612404565b508315610d8d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610667565b600081815260018301602052604081205461253457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610518565b506000610518565b60008181526001830160205260408120548015612625576000612560600183612d09565b855490915060009061257490600190612d09565b90508181146125d957600086600001828154811061259457612594612d2f565b90600052602060002001549050808760000184815481106125b7576125b7612d2f565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125ea576125ea613030565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610518565b6000915050610518565b5092915050565b6001600160a01b03821661268c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610667565b600081815260fd60205260409020546001600160a01b0316156126f15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610667565b6126ff60008383600161184f565b600081815260fd60205260409020546001600160a01b0316156127645760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610667565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6109678282611449565b6001600160e01b031981168114610ba157600080fd5b60006020828403121561280e57600080fd5b8135610d8d816127e6565b60005b8381101561283457818101518382015260200161281c565b50506000910152565b60008151808452612855816020860160208601612819565b601f01601f19169290920160200192915050565b602081526000610d8d602083018461283d565b60006020828403121561288e57600080fd5b5035919050565b80356001600160a01b03811681146128ac57600080fd5b919050565b600080604083850312156128c457600080fd5b6128cd83612895565b946020939093013593505050565b6000806000606084860312156128f057600080fd5b6128f984612895565b925061290760208501612895565b9150604084013590509250925092565b803580151581146128ac57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561295857612958612927565b604051601f8501601f19908116603f0116810190828211818310171561298057612980612927565b8160405280935085815286868601111561299957600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126129c457600080fd5b610d8d8383356020850161293d565b6000806000606084860312156129e857600080fd5b6129f184612917565b9250602084013567ffffffffffffffff80821115612a0e57600080fd5b612a1a878388016129b3565b93506040860135915080821115612a3057600080fd5b50612a3d868287016129b3565b9150509250925092565b60008060408385031215612a5a57600080fd5b82359150612a6a60208401612895565b90509250929050565b600080600060608486031215612a8857600080fd5b612a9184612895565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612ade57835183529284019291840191600101612ac2565b50909695505050505050565b600060208284031215612afc57600080fd5b610d8d82612917565b600060208284031215612b1757600080fd5b813567ffffffffffffffff811115612b2e57600080fd5b61111f848285016129b3565b600060208284031215612b4c57600080fd5b610d8d82612895565b60008060208385031215612b6857600080fd5b823567ffffffffffffffff80821115612b8057600080fd5b818501915085601f830112612b9457600080fd5b813581811115612ba357600080fd5b866020828501011115612bb557600080fd5b60209290920196919550909350505050565b60008060408385031215612bda57600080fd5b50508035926020909101359150565b60008060408385031215612bfc57600080fd5b612c0583612895565b9150612a6a60208401612917565b60008060008060808587031215612c2957600080fd5b612c3285612895565b9350612c4060208601612895565b925060408501359150606085013567ffffffffffffffff811115612c6357600080fd5b8501601f81018713612c7457600080fd5b612c838782356020840161293d565b91505092959194509250565b60008060408385031215612ca257600080fd5b612cab83612895565b9150612a6a60208401612895565b600181811c90821680612ccd57607f821691505b602082108103612ced57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561051857610518612cf3565b8082018082111561051857610518612cf3565b634e487b7160e01b600052603260045260246000fd5b60006000198203612d5857612d58612cf3565b5060010190565b601f82111561070857600081815260208120601f850160051c81016020861015612d865750805b601f850160051c820191505b81811015612da557828155600101612d92565b505050505050565b815167ffffffffffffffff811115612dc757612dc7612927565b612ddb81612dd58454612cb9565b84612d5f565b602080601f831160018114612e105760008415612df85750858301515b600019600386901b1c1916600185901b178555612da5565b600085815260208120601f198616915b82811015612e3f57888601518255948401946001909101908401612e20565b5085821015612e5d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561262f5761262f612cf3565b600084516020612e9b8285838a01612819565b855191840191612eae8184848a01612819565b8554920191600090612ebf81612cb9565b60018281168015612ed75760018114612eec57612f18565b60ff1984168752821515830287019450612f18565b896000528560002060005b84811015612f1057815489820152908301908701612ef7565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612f60816017850160208801612819565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612f9d816028840160208801612819565b01602801949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612fdb608083018461283d565b9695505050505050565b600060208284031215612ff757600080fd5b8151610d8d816127e6565b808202811582820484141761051857610518612cf3565b60008161302857613028612cf3565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806355f804b31161010f578063a217fddf116100a2578063ca15c87311610071578063ca15c87314610497578063d547741f146104aa578063da3ef23f146104bd578063e985e9c5146104d057600080fd5b8063a217fddf14610456578063a22cb4651461045e578063b88d4fde14610471578063c87b56dd1461048457600080fd5b80639010d07c116100de5780639010d07c146103dc57806391d14854146103ef57806393867fb51461042857806395d89b411461044e57600080fd5b806355f804b3146103905780636352211e146103a357806370a08231146103b65780638cd2403d146103c957600080fd5b806336568abe1161018757806343198ac41161015657806343198ac41461032857806349ade0961461034857806351f13b831461035b57806354fd4d501461038157600080fd5b806336568abe146102dc57806340c10f19146102ef57806342842e0e1461030257806342966c681461031557600080fd5b806323b872dd116101c357806323b872dd14610272578063248a9ca3146102855780632c8e0415146102b65780632f2ff15d146102c957600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b6102086102033660046127fc565b61050d565b60405190151581526020015b60405180910390f35b61022561051e565b6040516102149190612869565b61024561024036600461287c565b6105b0565b6040516001600160a01b039091168152602001610214565b61027061026b3660046128b1565b6105d7565b005b6102706102803660046128db565b61070d565b6102a861029336600461287c565b60009081526065602052604090206001015490565b604051908152602001610214565b6102706102c43660046129d3565b610794565b6102706102d7366004612a47565b6108ba565b6102706102ea366004612a47565b6108df565b6102706102fd3660046128b1565b61096b565b6102706103103660046128db565b6109a0565b61027061032336600461287c565b6109bb565b61033b610336366004612a73565b6109ef565b6040516102149190612aa6565b610270610356366004612aea565b610b1f565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014616102a8565b60405160018152602001610214565b61027061039e366004612b05565b610ba4565b6102456103b136600461287c565b610c0b565b6102a86103c4366004612b3a565b610c70565b6102706103d7366004612b55565b610d0a565b6102456103ea366004612bc7565b610d75565b6102086103fd366004612a47565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102a8565b610225610d94565b6102a8600081565b61027061046c366004612be9565b610da3565b61027061047f366004612c13565b610dae565b61022561049236600461287c565b610e36565b6102a86104a536600461287c565b610eb3565b6102706104b8366004612a47565b610eca565b6102706104cb366004612b05565b610eef565b6102086104de366004612c8f565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b600061051882610f56565b92915050565b606060fb805461052d90612cb9565b80601f016020809104026020016040519081016040528092919081815260200182805461055990612cb9565b80156105a65780601f1061057b576101008083540402835291602001916105a6565b820191906000526020600020905b81548152906001019060200180831161058957829003601f168201915b5050505050905090565b60006105bb82610fc8565b50600090815260ff60205260409020546001600160a01b031690565b60006105e282610c0b565b9050806001600160a01b0316836001600160a01b0316036106705760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061068c575061068c81336104de565b6106fe5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610667565b610708838361102c565b505050565b61071733826110a7565b6107895760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610667565b610708838383611127565b600054610100900460ff16158080156107b45750600054600160ff909116105b806107ce5750303b1580156107ce575060005460ff166001145b6108405760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610667565b6000805460ff191660011790558015610863576000805461ff0019166101001790555b61086e84848461136a565b80156108b4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108d58161143f565b6107088383611449565b6001600160a01b038116331461095d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610667565b610967828261146b565b5050565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b601461610996813361148d565b61070883836114e9565b61070883838360405180602001604052806000815250610dae565b7faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014616109e6813361148d565b61096782611503565b6060836109fb816115b3565b6001600160a01b03851660009081526101306020526040812090610a1e826115f3565b9050841580610a2c57508085115b15610a35578094505b84861115610a6f576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a7b8787612d09565b905060008167ffffffffffffffff811115610a9857610a98612927565b604051908082528060200260200182016040528015610ac1578160200160208202803683370190505b50905060005b82811015610b1257610ae3610adc828b612d1c565b86906115fd565b828281518110610af557610af5612d2f565b602090810291909101015280610b0a81612d45565b915050610ac7565b5098975050505050505050565b610b497f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012d5460ff16151581151514610ba15761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a15b50565b610bce7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012e610bdb8282612dad565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b989190612869565b600081815260fd60205260408120546001600160a01b0316806105185760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610667565b60006001600160a01b038216610cee5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610667565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610d1f9061ffff166001612e6d565b905061ffff8116600114610d5f576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d8d90836115fd565b9392505050565b606060fc805461052d90612cb9565b610967338383611609565b610db833836110a7565b610e2a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610667565b6108b4848484846116d8565b6060610e4182610fc8565b6000610e4b611761565b61012d5490915060ff1615610e605792915050565b805115610e9d5780610e7184611771565b61012f604051602001610e8693929190612e88565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b6000818152609760205260408120610518906115f3565b600082815260656020526040902060010154610ee58161143f565b610708838361146b565b610f197f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361148d565b61012f610f268282612dad565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b989190612869565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610fb957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610518575061051882611811565b600081815260fd60205260409020546001600160a01b0316610ba15760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610667565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061106e82610c0b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806110b383610c0b565b9050806001600160a01b0316846001600160a01b031614806110fb57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b8061111f5750836001600160a01b0316611114846105b0565b6001600160a01b0316145b949350505050565b826001600160a01b031661113a82610c0b565b6001600160a01b0316146111b65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610667565b6001600160a01b0382166112315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610667565b61123e838383600161184f565b826001600160a01b031661125182610c0b565b6001600160a01b0316146112cd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610667565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166113d55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b6113dd611979565b611434604051806060016040528060218152602001613047602191396040518060400160405280600c81526020017f434152424f4e2d535452415400000000000000000000000000000000000000008152506119f6565b610708838383611a6b565b610ba18133611b4a565b6114538282611bbf565b60008281526097602052604090206107089082611c61565b6114758282611c76565b60008281526097602052604090206107089082611cf9565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610967576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610967828260405180602001604052806000815250611d0e565b600061150e82610c0b565b905061151e81600084600161184f565b61152782610c0b565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b038116610ba1576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610518825490565b6000610d8d8383611d97565b816001600160a01b0316836001600160a01b03160361166a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610667565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6116e3848484611127565b6116ef84848484611dc1565b6108b45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b606061012e805461052d90612cb9565b6060600061177e83611f4a565b600101905060008167ffffffffffffffff81111561179e5761179e612927565b6040519080825280601f01601f1916602001820160405280156117c8576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846117d257509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061051857506105188261202c565b600181111561188a576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166118c1576001600160a01b0383166000908152610130602052604090206118bb9083612093565b506118ff565b826001600160a01b0316846001600160a01b0316146118ff576001600160a01b0384166000908152610130602052604090206118fd908361209f565b505b6001600160a01b038316611936576001600160a01b038416600090815261013060205260409020611930908361209f565b506108b4565b836001600160a01b0316836001600160a01b0316146108b4576001600160a01b0383166000908152610130602052604090206119729083612093565b5050505050565b600054610100900460ff166119e45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b6119ec6120ab565b6119f4612116565b565b600054610100900460ff16611a615760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b61096782826121e3565b600054610100900460ff16611ad65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b611b207faeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b6014617f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096612267565b61012d805460ff191684151517905561012e611b3c8382612dad565b5061012f6108b48282612dad565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661096757611b7d816122b2565b611b888360206122c4565b604051602001611b99929190612f28565b60408051601f198184030181529082905262461bcd60e51b825261066791600401612869565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109675760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c1d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d8d836001600160a01b0384166124ed565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109675760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d8d836001600160a01b03841661253c565b611d188383612636565b611d256000848484611dc1565b6107085760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b6000826000018281548110611dae57611dae612d2f565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611f3f576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e1e903390899088908890600401612fa9565b6020604051808303816000875af1925050508015611e59575060408051601f3d908101601f19168201909252611e5691810190612fe5565b60015b611f0c573d808015611e87576040519150601f19603f3d011682016040523d82523d6000602084013e611e8c565b606091505b508051600003611f045760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610667565b805181602001fd5b6001600160e01b0319167f150b7a020000000000000000000000000000000000000000000000000000000014905061111f565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611f93577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310611fbf576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611fdd57662386f26fc10000830492506010015b6305f5e1008310611ff5576305f5e100830492506008015b612710831061200957612710830492506004015b6064831061201b576064830492506002015b600a83106105185760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061051857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610518565b6000610d8d83836124ed565b6000610d8d838361253c565b600054610100900460ff166119f45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b600054610100900460ff166121815760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b60c9805461ffff191660011790556121b97f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612267565b6119f47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336127dc565b600054610100900460ff1661224e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610667565b60fb61225a8382612dad565b5060fc6107088282612dad565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60606105186001600160a01b03831660145b606060006122d3836002613002565b6122de906002612d1c565b67ffffffffffffffff8111156122f6576122f6612927565b6040519080825280601f01601f191660200182016040528015612320576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061235757612357612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123ba576123ba612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006123f6846002613002565b612401906001612d1c565b90505b600181111561249e577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061244257612442612d2f565b1a60f81b82828151811061245857612458612d2f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361249781613019565b9050612404565b508315610d8d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610667565b600081815260018301602052604081205461253457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610518565b506000610518565b60008181526001830160205260408120548015612625576000612560600183612d09565b855490915060009061257490600190612d09565b90508181146125d957600086600001828154811061259457612594612d2f565b90600052602060002001549050808760000184815481106125b7576125b7612d2f565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125ea576125ea613030565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610518565b6000915050610518565b5092915050565b6001600160a01b03821661268c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610667565b600081815260fd60205260409020546001600160a01b0316156126f15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610667565b6126ff60008383600161184f565b600081815260fd60205260409020546001600160a01b0316156127645760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610667565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6109678282611449565b6001600160e01b031981168114610ba157600080fd5b60006020828403121561280e57600080fd5b8135610d8d816127e6565b60005b8381101561283457818101518382015260200161281c565b50506000910152565b60008151808452612855816020860160208601612819565b601f01601f19169290920160200192915050565b602081526000610d8d602083018461283d565b60006020828403121561288e57600080fd5b5035919050565b80356001600160a01b03811681146128ac57600080fd5b919050565b600080604083850312156128c457600080fd5b6128cd83612895565b946020939093013593505050565b6000806000606084860312156128f057600080fd5b6128f984612895565b925061290760208501612895565b9150604084013590509250925092565b803580151581146128ac57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561295857612958612927565b604051601f8501601f19908116603f0116810190828211818310171561298057612980612927565b8160405280935085815286868601111561299957600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126129c457600080fd5b610d8d8383356020850161293d565b6000806000606084860312156129e857600080fd5b6129f184612917565b9250602084013567ffffffffffffffff80821115612a0e57600080fd5b612a1a878388016129b3565b93506040860135915080821115612a3057600080fd5b50612a3d868287016129b3565b9150509250925092565b60008060408385031215612a5a57600080fd5b82359150612a6a60208401612895565b90509250929050565b600080600060608486031215612a8857600080fd5b612a9184612895565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612ade57835183529284019291840191600101612ac2565b50909695505050505050565b600060208284031215612afc57600080fd5b610d8d82612917565b600060208284031215612b1757600080fd5b813567ffffffffffffffff811115612b2e57600080fd5b61111f848285016129b3565b600060208284031215612b4c57600080fd5b610d8d82612895565b60008060208385031215612b6857600080fd5b823567ffffffffffffffff80821115612b8057600080fd5b818501915085601f830112612b9457600080fd5b813581811115612ba357600080fd5b866020828501011115612bb557600080fd5b60209290920196919550909350505050565b60008060408385031215612bda57600080fd5b50508035926020909101359150565b60008060408385031215612bfc57600080fd5b612c0583612895565b9150612a6a60208401612917565b60008060008060808587031215612c2957600080fd5b612c3285612895565b9350612c4060208601612895565b925060408501359150606085013567ffffffffffffffff811115612c6357600080fd5b8501601f81018713612c7457600080fd5b612c838782356020840161293d565b91505092959194509250565b60008060408385031215612ca257600080fd5b612cab83612895565b9150612a6a60208401612895565b600181811c90821680612ccd57607f821691505b602082108103612ced57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561051857610518612cf3565b8082018082111561051857610518612cf3565b634e487b7160e01b600052603260045260246000fd5b60006000198203612d5857612d58612cf3565b5060010190565b601f82111561070857600081815260208120601f850160051c81016020861015612d865750805b601f850160051c820191505b81811015612da557828155600101612d92565b505050505050565b815167ffffffffffffffff811115612dc757612dc7612927565b612ddb81612dd58454612cb9565b84612d5f565b602080601f831160018114612e105760008415612df85750858301515b600019600386901b1c1916600185901b178555612da5565b600085815260208120601f198616915b82811015612e3f57888601518255948401946001909101908401612e20565b5085821015612e5d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561262f5761262f612cf3565b600084516020612e9b8285838a01612819565b855191840191612eae8184848a01612819565b8554920191600090612ebf81612cb9565b60018281168015612ed75760018114612eec57612f18565b60ff1984168752821515830287019450612f18565b896000528560002060005b84811015612f1057815489820152908301908701612ef7565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612f60816017850160208801612819565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612f9d816028840160208801612819565b01602801949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612fdb608083018461283d565b9695505050505050565b600060208284031215612ff757600080fd5b8151610d8d816127e6565b808202811582820484141761051857610518612cf3565b60008161302857613028612cf3565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." - }, - "ApprovalForAll(address,address,bool)": { - "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." - }, - "BaseExtensionUpdated(string)": { - "details": "triggered when updating the baseExtension" - }, - "BaseURIUpdated(string)": { - "details": "triggered when updating the baseURI" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `tokenId` token is transferred from `from` to `to`." - }, - "UseGlobalURIUpdated(bool)": { - "details": "triggered when updating useGlobalURI" - } - }, - "kind": "dev", - "methods": { - "approve(address,uint256)": { - "details": "See {IERC721-approve}." - }, - "balanceOf(address)": { - "details": "See {IERC721-balanceOf}." - }, - "burn(uint256)": { - "details": "destroys the voucher token for the given strategyId requirements: - the caller must have the ROLE_MINTER privilege" - }, - "getApproved(uint256)": { - "details": "See {IERC721-getApproved}." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(bool,string,string)": { - "details": "fully initializes the contract and its parents" - }, - "isApprovedForAll(address,address)": { - "details": "See {IERC721-isApprovedForAll}." - }, - "mint(address,uint256)": { - "details": "creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must have the ROLE_MINTER privilege" - }, - "name()": { - "details": "See {IERC721Metadata-name}." - }, - "ownerOf(uint256)": { - "details": "See {IERC721-ownerOf}." - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "roleMinter()": { - "details": "returns the minter role" - }, - "safeTransferFrom(address,address,uint256)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "safeTransferFrom(address,address,uint256,bytes)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "setApprovalForAll(address,bool)": { - "details": "See {IERC721-setApprovalForAll}." - }, - "setBaseExtension(string)": { - "details": "sets the base extension requirements: - the caller must be the admin of this contract" - }, - "setBaseURI(string)": { - "details": "sets the base URI requirements: - the caller must be the admin of this contract" - }, - "supportsInterface(bytes4)": { - "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." - }, - "symbol()": { - "details": "See {IERC721Metadata-symbol}." - }, - "tokenURI(uint256)": { - "details": "depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens" - }, - "tokensByOwner(address,uint256,uint256)": { - "details": "returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex" - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC721-transferFrom}." - }, - "useGlobalURI(bool)": { - "details": "sets the useGlobalURI flag requirements: - the caller must be the admin of this contract" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2388, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2607, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)5352_storage)" - }, - { - "astId": 143, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 17045, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 17051, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 979, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_name", - "offset": 0, - "slot": "251", - "type": "t_string_storage" - }, - { - "astId": 981, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_symbol", - "offset": 0, - "slot": "252", - "type": "t_string_storage" - }, - { - "astId": 985, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_owners", - "offset": 0, - "slot": "253", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 989, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_balances", - "offset": 0, - "slot": "254", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 993, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_tokenApprovals", - "offset": 0, - "slot": "255", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 999, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_operatorApprovals", - "offset": 0, - "slot": "256", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" - }, - { - "astId": 1901, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "257", - "type": "t_array(t_uint256)44_storage" - }, - { - "astId": 17370, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_useGlobalURI", - "offset": 0, - "slot": "301", - "type": "t_bool" - }, - { - "astId": 17372, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__baseURI", - "offset": 0, - "slot": "302", - "type": "t_string_storage" - }, - { - "astId": 17374, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_baseExtension", - "offset": 0, - "slot": "303", - "type": "t_string_storage" - }, - { - "astId": 17379, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_ownedTokens", - "offset": 0, - "slot": "304", - "type": "t_mapping(t_address,t_struct(UintSet)10166_storage)" - }, - { - "astId": 17385, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "305", - "type": "t_array(t_uint256)46_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)44_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" - }, - "t_array(t_uint256)46_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[46]", - "numberOfBytes": "1472" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_address,t_struct(UintSet)10166_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct EnumerableSet.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)10166_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)5352_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)5352_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)5352_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 5351, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)5037_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)5037_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 5032, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 5036, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)9694_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 9689, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 9693, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)10166_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.UintSet", - "members": [ - { - "astId": 10165, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)9694_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/ethereum/Voucher_Proxy.json b/src/contracts/ethereum/Voucher_Proxy.json deleted file mode 100644 index 3cbdb83..0000000 --- a/src/contracts/ethereum/Voucher_Proxy.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "receipt": { - "to": null, - "from": "0x5bEBA4D3533a963Dedb270a95ae5f7752fA0Fe22", - "contractAddress": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "transactionIndex": 167, - "gasUsed": "995176", - "logsBloom": "0x000000040000000008000000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000020000000000000000000000080000000004000000000200004000000000000008000000008000000000400000000000000000000100080000000000000000000000000000000000a0000000000000800008000000000000000000000000000400000000000000000000001000000000010040000020000000000000000000040000000000000408000100000000024020000000000000000000000000020010000000000000000000000000000000000000", - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20", - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "logs": [ - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000c6b2f9b6bf3521308fb9360e4a6fe05f63953997" - ], - "data": "0x", - "logIndex": 247, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 248, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22", - "0x0000000000000000000000005beba4d3533a963dedb270a95ae5f7752fa0fe22" - ], - "data": "0x", - "logIndex": 249, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0xaeaef46186eb59f884e36929b6d682a6ae35e1e43d8f05f058dcefb92b601461", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 250, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 251, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - }, - { - "transactionIndex": 167, - "blockNumber": 17087131, - "transactionHash": "0xd97eb5e3ea04719f29fa12eed85412e5cbac2622ada0c6684b6f9647265a80a4", - "address": "0x3660F04B79751e31128f6378eAC70807e38f554E", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064287956b8b587670d4d9b94378177f6c52f0034", - "logIndex": 252, - "blockHash": "0x6c189ae1354564315bd5da3fb6a7804a23d95b2178bd9d4dfaa91ff7d76ddb20" - } - ], - "blockNumber": 17087131, - "cumulativeGasUsed": "12521094", - "status": 1, - "byzantium": true - }, - "args": [ - "0xC6B2F9B6bF3521308Fb9360e4a6fe05F63953997", - "0x64287956B8b587670d4D9B94378177F6c52F0034", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/sei/CarbonController.json b/src/contracts/sei/CarbonController.json deleted file mode 100644 index 4c50077..0000000 --- a/src/contracts/sei/CarbonController.json +++ /dev/null @@ -1,1854 +0,0 @@ -{ - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "transactionIndex": 0, - "gasUsed": "857050", - "logsBloom": "0x000040048200000008020000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000001000000000000000000000000000000000200004000000000001008000000008000000000200000000000000000000140000000000000000000000000000000000000a0000000000001800000000000000400000000000000000400000040000000000000001000000000000000000020000002000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279", - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000008ce318919438982514f9f479fdfb40d32c6ab749" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 1, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 6, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - } - ], - "blockNumber": 79146720, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0x8cE318919438982514F9f479FDfB40D32C6ab749", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x8129fc1c" - ], - "numDeployments": 2, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "postUpgrade", - "args": [ - "0x" - ] - }, - "implementation": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/sei/CarbonController_Implementation.json b/src/contracts/sei/CarbonController_Implementation.json deleted file mode 100644 index 6ad8570..0000000 --- a/src/contracts/sei/CarbonController_Implementation.json +++ /dev/null @@ -1,2278 +0,0 @@ -{ - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IVoucher", - "name": "initVoucher", - "type": "address" - }, - { - "internalType": "address", - "name": "proxy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BalanceMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "GreaterThanMaxInput", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientCapacity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRate", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTradeActionStrategyId", - "type": "error" - }, - { - "inputs": [], - "name": "LowerThanMinReturn", - "type": "error" - }, - { - "inputs": [], - "name": "NativeAmountMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "OrderDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "OutDated", - "type": "error" - }, - { - "inputs": [], - "name": "Overflow", - "type": "error" - }, - { - "inputs": [], - "name": "PairAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "PairDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownDelegator", - "type": "error" - }, - { - "inputs": [], - "name": "UnnecessaryNativeTokenReceived", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroValue", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "FeesWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "pairId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "PairTradingFeePPMUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - } - ], - "name": "StrategyDeleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order0", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "order1", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "reason", - "type": "uint8" - } - ], - "name": "StrategyUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sourceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "targetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "tradingFeeAmount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bool", - "name": "byTargetAmount", - "type": "bool" - } - ], - "name": "TokensTraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "prevFeePPM", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "newFeePPM", - "type": "uint32" - } - ], - "name": "TradingFeePPMUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - } - ], - "name": "accumulatedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeSourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - } - ], - "name": "calculateTradeTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "controllerType", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "name": "createStrategy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - } - ], - "name": "deleteStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pair", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - } - ], - "internalType": "struct Pair", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "pairTradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairs", - "outputs": [ - { - "internalType": "Token[2][]", - "name": "", - "type": "address[2][]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "roleFeesManager", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newPairTradingFeePPM", - "type": "uint32" - } - ], - "name": "setPairTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "newTradingFeePPM", - "type": "uint32" - } - ], - "name": "setTradingFeePPM", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "strategiesByPair", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token0", - "type": "address" - }, - { - "internalType": "Token", - "name": "token1", - "type": "address" - } - ], - "name": "strategiesByPairCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "strategy", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "Token[2]", - "name": "tokens", - "type": "address[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "orders", - "type": "tuple[2]" - } - ], - "internalType": "struct Strategy", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "minReturn", - "type": "uint128" - } - ], - "name": "tradeBySourceAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "sourceToken", - "type": "address" - }, - { - "internalType": "Token", - "name": "targetToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "internalType": "struct TradeAction[]", - "name": "tradeActions", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "maxInput", - "type": "uint128" - } - ], - "name": "tradeByTargetAmount", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "tradingFeePPM", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "strategyId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "currentOrders", - "type": "tuple[2]" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "y", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "z", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "A", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "B", - "type": "uint64" - } - ], - "internalType": "struct Order[2]", - "name": "newOrders", - "type": "tuple[2]" - } - ], - "name": "updateStrategy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "Token", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "transactionIndex": 0, - "gasUsed": "5363223", - "logsBloom": "0x000000048200000008000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000204000000000000000000000000000000000000000000000000200004000000000000008000000000000000000200000000000000000000140000000000000000000000000000000000000a0000000000000000000000000000400000000000000000400000040000000000000001000000004000000000000000000000000000000040000000000000040000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4", - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 0, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - }, - { - "transactionIndex": 35, - "blockNumber": 79146734, - "transactionHash": "0xbf53cc147da767f6fdbf042d5c4de260a432226ba97efa1e2de86c146b0860e0", - "address": "0x8c05EA305235a67c7095a32Ad4a2Ee2688aDe636", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0x18d0ad612b66635d6e665a1a31b3852e01db3ac3b873b2c5c33a4a6c8ee149b4" - } - ], - "blockNumber": 79146734, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "0xe4816658ad10bF215053C533cceAe3f59e1f1087" - ], - "numDeployments": 2, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVoucher\",\"name\":\"initVoucher\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BalanceMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GreaterThanMaxInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IdenticalAddresses\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientCapacity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTradeActionStrategyId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LowerThanMinReturn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeAmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OrderDisabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutDated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PairDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnknownDelegator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnnecessaryNativeTokenReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValue\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"pairId\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"PairTradingFeePPMUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"}],\"name\":\"StrategyDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order0\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"struct Order\",\"name\":\"order1\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"reason\",\"type\":\"uint8\"}],\"name\":\"StrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sourceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"targetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"tradingFeeAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"byTargetAmount\",\"type\":\"bool\"}],\"name\":\"TokensTraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"prevFeePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newFeePPM\",\"type\":\"uint32\"}],\"name\":\"TradingFeePPMUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"accumulatedFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeSourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"}],\"name\":\"calculateTradeTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controllerType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"}],\"name\":\"deleteStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"}],\"internalType\":\"struct Pair\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"pairTradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairs\",\"outputs\":[{\"internalType\":\"Token[2][]\",\"name\":\"\",\"type\":\"address[2][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleFeesManager\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"newPairTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setPairTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newTradingFeePPM\",\"type\":\"uint32\"}],\"name\":\"setTradingFeePPM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"strategiesByPair\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"strategiesByPairCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"strategy\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"Token[2]\",\"name\":\"tokens\",\"type\":\"address[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"orders\",\"type\":\"tuple[2]\"}],\"internalType\":\"struct Strategy\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"minReturn\",\"type\":\"uint128\"}],\"name\":\"tradeBySourceAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"sourceToken\",\"type\":\"address\"},{\"internalType\":\"Token\",\"name\":\"targetToken\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"struct TradeAction[]\",\"name\":\"tradeActions\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"maxInput\",\"type\":\"uint128\"}],\"name\":\"tradeByTargetAmount\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tradingFeePPM\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"strategyId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"currentOrders\",\"type\":\"tuple[2]\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"y\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"z\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"A\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"B\",\"type\":\"uint64\"}],\"internalType\":\"struct Order[2]\",\"name\":\"newOrders\",\"type\":\"tuple[2]\"}],\"name\":\"updateStrategy\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Carbon Controller contract\",\"events\":{\"FeesWithdrawn(address,address,uint256,address)\":{\"details\":\"triggered when fees are withdrawn\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"PairCreated(uint128,address,address)\":{\"details\":\"triggered when a new pair is created\"},\"PairTradingFeePPMUpdated(address,address,uint32,uint32)\":{\"details\":\"triggered when the custom trading fee for a given pair is updated\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is created\"},\"StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))\":{\"details\":\"triggered when a strategy is deleted\"},\"StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)\":{\"details\":\"triggered when a strategy is updated\"},\"TokensTraded(address,address,address,uint256,uint256,uint128,bool)\":{\"details\":\"triggered when tokens are traded\"},\"TradingFeePPMUpdated(uint32,uint32)\":{\"details\":\"triggered when the network fee is updated\"}},\"kind\":\"dev\",\"methods\":{\"accumulatedFees(address)\":{\"details\":\"returns the amount of fees accumulated for the specified token\"},\"calculateTradeSourceAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the source amount required when trading by target amount\"},\"calculateTradeTargetAmount(address,address,(uint256,uint128)[])\":{\"details\":\"returns the target amount expected when trading by source amount\"},\"constructor\":{\"details\":\"used to set immutable state variables and initialize the implementation\"},\"controllerType()\":{\"details\":\"returns the type of the controller\"},\"createPair(address,address)\":{\"details\":\"creates a new pair of provided token0 and token1\"},\"createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any\"},\"deleteStrategy(uint256)\":{\"details\":\"deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize()\":{\"details\":\"fully initializes the contract and its parents\"},\"pair(address,address)\":{\"details\":\"returns a pair's metadata matching the provided token0 and token1\"},\"pairTradingFeePPM(address,address)\":{\"details\":\"returns the trading fee for a given pair (in units of PPM)\"},\"pairs()\":{\"details\":\"returns a list of all supported pairs\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"roleFeesManager()\":{\"details\":\"returns the fees manager role\"},\"setPairTradingFeePPM(address,address,uint32)\":{\"details\":\"sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"setTradingFeePPM(uint32)\":{\"details\":\"sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract\"},\"strategiesByPair(address,address,uint256,uint256)\":{\"details\":\"returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex\"},\"strategiesByPairCount(address,address)\":{\"details\":\"returns the count of strategies belonging to a specific pair\"},\"strategy(uint256)\":{\"details\":\"returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)\":{\"details\":\"performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token\"},\"tradingFeePPM()\":{\"details\":\"returns the trading fee (in units of PPM)\"},\"updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])\":{\"details\":\"updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any\"},\"withdrawFees(address,uint256,address)\":{\"details\":\"transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/carbon/CarbonController.sol\":\"CarbonController\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\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 * 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 default value returned by this function, unless\\n * it's 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address owner, address spender, uint256 amount) 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(address from, address to, uint256 amount) 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(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface 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\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/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 /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\\n * 0 before setting it to a non-zero value.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"contracts/carbon/CarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Pairs, Pair } from \\\"./Pairs.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Strategies, Strategy, TradeAction, Order, TradeTokens } from \\\"./Strategies.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { ICarbonController } from \\\"./interfaces/ICarbonController.sol\\\";\\nimport { Utils, AccessDenied } from \\\"../utility/Utils.sol\\\";\\nimport { OnlyProxyDelegate } from \\\"../utility/OnlyProxyDelegate.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev Carbon Controller contract\\n */\\ncontract CarbonController is\\n ICarbonController,\\n Pairs,\\n Strategies,\\n Upgradeable,\\n ReentrancyGuardUpgradeable,\\n OnlyProxyDelegate,\\n Utils\\n{\\n // the fees manager role is required to withdraw fees\\n bytes32 private constant ROLE_FEES_MANAGER = keccak256(\\\"ROLE_FEES_MANAGER\\\");\\n\\n uint16 private constant CONTROLLER_TYPE = 1;\\n\\n // deprecated parent storage vars\\n bool private _deprecated;\\n uint256[49] private __deprecated;\\n\\n // the voucher contract\\n IVoucher private immutable _voucher;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP] private __gap;\\n\\n error IdenticalAddresses();\\n error UnnecessaryNativeTokenReceived();\\n error InsufficientNativeTokenReceived();\\n error DeadlineExpired();\\n\\n /**\\n * @dev used to set immutable state variables and initialize the implementation\\n */\\n constructor(IVoucher initVoucher, address proxy) OnlyProxyDelegate(proxy) {\\n _validAddress(address(initVoucher));\\n\\n _voucher = initVoucher;\\n initialize();\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize() public initializer {\\n __CarbonController_init();\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __CarbonController_init() internal onlyInitializing {\\n __Pairs_init();\\n __Strategies_init();\\n __Upgradeable_init();\\n __ReentrancyGuard_init();\\n\\n __CarbonController_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __CarbonController_init_unchained() internal onlyInitializing {\\n // set up administrative roles\\n _setRoleAdmin(ROLE_FEES_MANAGER, ROLE_ADMIN);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure virtual override(IVersioned, Upgradeable) returns (uint16) {\\n return 6;\\n }\\n\\n /**\\n * @dev returns the fees manager role\\n */\\n function roleFeesManager() external pure returns (bytes32) {\\n return ROLE_FEES_MANAGER;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function controllerType() external pure virtual returns (uint16) {\\n return CONTROLLER_TYPE;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradingFeePPM() external view returns (uint32) {\\n return _tradingFeePPM;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32) {\\n Pair memory _pair = _pair(token0, token1);\\n return _getPairTradingFeePPM(_pair.id);\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setTradingFeePPM(uint32 newTradingFeePPM) external onlyAdmin validFee(newTradingFeePPM) {\\n _setTradingFeePPM(newTradingFeePPM);\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of the contract\\n */\\n function setPairTradingFeePPM(\\n Token token0,\\n Token token1,\\n uint32 newPairTradingFeePPM\\n ) external onlyAdmin validFee(newPairTradingFeePPM) {\\n Pair memory _pair = _pair(token0, token1);\\n _setPairTradingFeePPM(_pair, newPairTradingFeePPM);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createPair(Token token0, Token token1) external nonReentrant onlyProxyDelegate returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _createPair(token0, token1);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pairs() external view returns (Token[2][] memory) {\\n return _pairs();\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory) {\\n _validateInputTokens(token0, token1);\\n return _pair(token0, token1);\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function createStrategy(\\n Token token0,\\n Token token1,\\n Order[2] calldata orders\\n ) external payable nonReentrant onlyProxyDelegate returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !token0.isNative() && !token1.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(orders);\\n\\n // create the pair if it does not exist\\n Pair memory strategyPair;\\n if (!_pairExists(token0, token1)) {\\n strategyPair = _createPair(token0, token1);\\n } else {\\n strategyPair = _pair(token0, token1);\\n }\\n\\n Token[2] memory tokens = [token0, token1];\\n return _createStrategy(_voucher, tokens, orders, strategyPair, msg.sender, msg.value);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable nonReentrant onlyProxyDelegate {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // don't allow unnecessary eth\\n if (msg.value > 0 && !strategyPair.tokens[0].isNative() && !strategyPair.tokens[1].isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n\\n // revert if any of the orders is invalid\\n _validateOrders(newOrders);\\n\\n // perform update\\n _updateStrategy(strategyId, currentOrders, newOrders, strategyPair, msg.sender, msg.value);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function deleteStrategy(uint256 strategyId) external nonReentrant onlyProxyDelegate {\\n // find strategy, reverts if none\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(strategyId));\\n\\n // only the owner of the strategy is allowed to delete it\\n if (msg.sender != _voucher.ownerOf(strategyId)) {\\n revert AccessDenied();\\n }\\n\\n // delete strategy\\n _deleteStrategy(strategyId, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategy(uint256 id) external view returns (Strategy memory) {\\n Pair memory strategyPair = _pairById(_pairIdByStrategyId(id));\\n return _strategy(id, _voucher, strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPair(strategyPair, startIndex, endIndex, _voucher);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256) {\\n _validateInputTokens(token0, token1);\\n\\n Pair memory strategyPair = _pair(token0, token1);\\n return _strategiesByPairCount(strategyPair);\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, minReturn);\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: false,\\n constraint: minReturn,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable nonReentrant onlyProxyDelegate returns (uint128) {\\n _validateTradeParams(sourceToken, targetToken, deadline, msg.value, maxInput);\\n\\n if (sourceToken.isNative()) {\\n // tx's value should at least match the maxInput\\n if (msg.value < maxInput) {\\n revert InsufficientNativeTokenReceived();\\n }\\n }\\n\\n Pair memory _pair = _pair(sourceToken, targetToken);\\n TradeParams memory params = TradeParams({\\n trader: msg.sender,\\n tokens: TradeTokens({ source: sourceToken, target: targetToken }),\\n byTargetAmount: true,\\n constraint: maxInput,\\n txValue: msg.value,\\n pair: _pair,\\n sourceAmount: 0,\\n targetAmount: 0\\n });\\n _trade(tradeActions, params);\\n return params.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, true);\\n return amounts.sourceAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128) {\\n _validateInputTokens(sourceToken, targetToken);\\n Pair memory strategyPair = _pair(sourceToken, targetToken);\\n TradeTokens memory tokens = TradeTokens({ source: sourceToken, target: targetToken });\\n SourceAndTargetAmounts memory amounts = _tradeSourceAndTargetAmounts(tokens, tradeActions, strategyPair, false);\\n return amounts.targetAmount;\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function accumulatedFees(Token token) external view validAddress(Token.unwrap(token)) returns (uint256) {\\n return _accumulatedFees[token];\\n }\\n\\n /**\\n * @inheritdoc ICarbonController\\n */\\n function withdrawFees(\\n Token token,\\n uint256 amount,\\n address recipient\\n )\\n external\\n onlyRoleMember(ROLE_FEES_MANAGER)\\n validAddress(recipient)\\n validAddress(Token.unwrap(token))\\n greaterThanZero(amount)\\n nonReentrant\\n returns (uint256)\\n {\\n return _withdrawFees(msg.sender, amount, token, recipient);\\n }\\n\\n /**\\n * @dev validates both tokens are valid addresses and unique\\n */\\n function _validateInputTokens(\\n Token token0,\\n Token token1\\n ) private pure validAddress(Token.unwrap(token0)) validAddress(Token.unwrap(token1)) {\\n if (token0 == token1) {\\n revert IdenticalAddresses();\\n }\\n }\\n\\n /**\\n * performs all necessary validations on the trade parameters\\n */\\n function _validateTradeParams(\\n Token sourceToken,\\n Token targetToken,\\n uint256 deadline,\\n uint256 value,\\n uint128 constraint\\n ) private view {\\n // revert if deadline has passed\\n if (deadline < block.timestamp) {\\n revert DeadlineExpired();\\n }\\n\\n // validate minReturn / maxInput\\n _greaterThanZero(constraint);\\n\\n // make sure source and target tokens are valid\\n _validateInputTokens(sourceToken, targetToken);\\n\\n // there shouldn't be any native token sent unless the source token is the native token\\n if (value > 0 && !sourceToken.isNative()) {\\n revert UnnecessaryNativeTokenReceived();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf08eeaf8950b3ff318470b8949e2b8251dea6962c8add54a2f94e48676dc832\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Pairs.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nstruct Pair {\\n uint128 id;\\n Token[2] tokens;\\n}\\n\\nabstract contract Pairs is Initializable {\\n error PairAlreadyExists();\\n error PairDoesNotExist();\\n\\n // unique incremental id representing a pair\\n uint128 private _lastPairId;\\n\\n // mapping of pairs of tokens to their pair id, tokens are sorted at any order\\n mapping(Token => mapping(Token => uint128)) private _pairIds;\\n\\n // mapping between a pairId to its Pair object\\n mapping(uint128 => Token[2]) private _pairsStorage;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 3] private __gap;\\n\\n /**\\n * @dev triggered when a new pair is created\\n */\\n event PairCreated(uint128 indexed pairId, Token indexed token0, Token indexed token1);\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Pairs_init() internal onlyInitializing {\\n __Pairs_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Pairs_init_unchained() internal onlyInitializing {}\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev generates and stores a new pair, tokens are assumed unique and valid\\n */\\n function _createPair(Token token0, Token token1) internal returns (Pair memory) {\\n // validate pair existence\\n if (_pairExists(token0, token1)) {\\n revert PairAlreadyExists();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // increment pair id\\n uint128 id = _lastPairId + 1;\\n _lastPairId = id;\\n\\n // store pair\\n _pairsStorage[id] = sortedTokens;\\n _pairIds[sortedTokens[0]][sortedTokens[1]] = id;\\n\\n emit PairCreated(id, sortedTokens[0], sortedTokens[1]);\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n /**\\n * @dev return a pair matching the given tokens\\n */\\n function _pair(Token token0, Token token1) internal view returns (Pair memory) {\\n // validate pair existence\\n if (!_pairExists(token0, token1)) {\\n revert PairDoesNotExist();\\n }\\n\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n // return pair\\n uint128 id = _pairIds[sortedTokens[0]][sortedTokens[1]];\\n return Pair({ id: id, tokens: sortedTokens });\\n }\\n\\n function _pairById(uint128 pairId) internal view returns (Pair memory) {\\n Token[2] memory tokens = _pairsStorage[pairId];\\n if (Token.unwrap(tokens[0]) == address(0)) {\\n revert PairDoesNotExist();\\n }\\n return Pair({ id: pairId, tokens: tokens });\\n }\\n\\n /**\\n * @dev check for the existence of a pair (pair id's are sequential integers starting at 1)\\n */\\n function _pairExists(Token token0, Token token1) internal view returns (bool) {\\n // sort tokens\\n Token[2] memory sortedTokens = _sortTokens(token0, token1);\\n\\n if (_pairIds[sortedTokens[0]][sortedTokens[1]] == 0) {\\n return false;\\n }\\n return true;\\n }\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function _pairs() internal view returns (Token[2][] memory) {\\n uint128 length = _lastPairId;\\n Token[2][] memory list = new Token[2][](length);\\n for (uint128 i = 0; i < length; i++) {\\n list[i] = _pairsStorage[i + 1];\\n }\\n\\n return list;\\n }\\n\\n /**\\n * returns the given tokens sorted by address value, smaller first\\n */\\n function _sortTokens(Token token0, Token token1) private pure returns (Token[2] memory) {\\n return Token.unwrap(token0) < Token.unwrap(token1) ? [token0, token1] : [token1, token0];\\n }\\n}\\n\",\"keccak256\":\"0xf93c805727414083085098262481ac9def2bdeafcb71934234b0b92cc6320551\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/Strategies.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\nimport { Initializable } from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSetUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport { MathEx } from \\\"../utility/MathEx.sol\\\";\\nimport { InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { Token } from \\\"../token/Token.sol\\\";\\nimport { Pair } from \\\"./Pairs.sol\\\";\\nimport { IVoucher } from \\\"../voucher/interfaces/IVoucher.sol\\\";\\nimport { PPM_RESOLUTION } from \\\"../utility/Constants.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\n/**\\n * @dev:\\n *\\n * a strategy consists of two orders:\\n * - order 0 sells `y0` units of token 0 at a marginal rate `M0` ranging between `L0` and `H0`\\n * - order 1 sells `y1` units of token 1 at a marginal rate `M1` ranging between `L1` and `H1`\\n *\\n * rate symbols:\\n * - `L0` indicates the lowest value of one wei of token 0 in units of token 1\\n * - `H0` indicates the highest value of one wei of token 0 in units of token 1\\n * - `M0` indicates the marginal value of one wei of token 0 in units of token 1\\n * - `L1` indicates the lowest value of one wei of token 1 in units of token 0\\n * - `H1` indicates the highest value of one wei of token 1 in units of token 0\\n * - `M1` indicates the marginal value of one wei of token 1 in units of token 0\\n *\\n * the term \\\"one wei\\\" serves here as a simplification of \\\"an amount tending to zero\\\",\\n * hence the rate values above are all theoretical.\\n * moreover, since trade calculation is based on the square roots of the rates,\\n * an order doesn't actually hold the rate values, but a modified version of them.\\n * for each rate `r`, the order maintains:\\n * - mantissa: the value of the 48 most significant bits of `floor(sqrt(r) * 2 ^ 48)`\\n * - exponent: the number of the remaining (least significant) bits, limited up to 48\\n * this allows for rates between ~12.6e-28 and ~7.92e+28, at an average resolution of ~2.81e+14.\\n * it also ensures that every rate value `r` is supported if and only if `1 / r` is supported.\\n * however, it also yields a certain degree of accuracy loss as soon as the order is created.\\n *\\n * encoding / decoding scheme:\\n * - `b(x) = bit-length of x`\\n * - `c(x) = max(b(x) - 48, 0)`\\n * - `f(x) = floor(sqrt(x) * (1 << 48))`\\n * - `g(x) = f(x) >> c(f(x)) << c(f(x))`\\n * - `e(x) = (x >> c(x)) | (c(x) << 48)`\\n * - `d(x) = (x & ((1 << 48) - 1)) << (x >> 48)`\\n *\\n * let the following denote:\\n * - `L = g(lowest rate)`\\n * - `H = g(highest rate)`\\n * - `M = g(marginal rate)`\\n *\\n * then the order maintains:\\n * - `y = current liquidity`\\n * - `z = current liquidity * (H - L) / (M - L)`\\n * - `A = e(H - L)`\\n * - `B = e(L)`\\n *\\n * and the order reflects:\\n * - `L = d(B)`\\n * - `H = d(B + A)`\\n * - `M = d(B + A * y / z)`\\n *\\n * upon trading on a given order in a given strategy:\\n * - the value of `y` in the given order decreases\\n * - the value of `y` in the other order increases\\n * - the value of `z` in the other order may increase\\n * - the values of all other parameters remain unchanged\\n *\\n * given a source amount `x`, the expected target amount is:\\n * - theoretical formula: `M ^ 2 * x * y / (M * (M - L) * x + y)`\\n * - implemented formula: `x * (A * y + B * z) ^ 2 / (A * x * (A * y + B * z) + z ^ 2)`\\n *\\n * given a target amount `x`, the required source amount is:\\n * - theoretical formula: `x * y / (M * (L - M) * x + M ^ 2 * y)`\\n * - implemented formula: `x * z ^ 2 / ((A * y + B * z) * (A * y + B * z - A * x))`\\n *\\n * fee scheme:\\n * +-------------------+---------------------------------+---------------------------------+\\n * | trade function | trader transfers to contract | contract transfers to trader |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | bySourceAmount(x) | trader transfers to contract: x | p = expectedTargetAmount(x) |\\n * | | | q = p * (100 - fee%) / 100 |\\n * | | | contract transfers to trader: q |\\n * | | | contract retains as fee: p - q |\\n * +-------------------+---------------------------------+---------------------------------+\\n * | byTargetAmount(x) | p = requiredSourceAmount(x) | contract transfers to trader: x |\\n * | | q = p * 100 / (100 - fee%) | |\\n * | | trader transfers to contract: q | |\\n * | | contract retains as fee: q - p | |\\n * +-------------------+---------------------------------+---------------------------------+\\n */\\n\\n// solhint-disable var-name-mixedcase\\nstruct Order {\\n uint128 y;\\n uint128 z;\\n uint64 A;\\n uint64 B;\\n}\\n// solhint-enable var-name-mixedcase\\n\\nstruct TradeTokens {\\n Token source;\\n Token target;\\n}\\n\\nstruct Strategy {\\n uint256 id;\\n address owner;\\n Token[2] tokens;\\n Order[2] orders;\\n}\\n\\nstruct TradeAction {\\n uint256 strategyId;\\n uint128 amount;\\n}\\n\\n// strategy update reasons\\nuint8 constant STRATEGY_UPDATE_REASON_EDIT = 0;\\nuint8 constant STRATEGY_UPDATE_REASON_TRADE = 1;\\n\\nabstract contract Strategies is Initializable {\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using Address for address payable;\\n using SafeCast for uint256;\\n\\n error NativeAmountMismatch();\\n error BalanceMismatch();\\n error GreaterThanMaxInput();\\n error LowerThanMinReturn();\\n error InsufficientCapacity();\\n error InsufficientLiquidity();\\n error InvalidRate();\\n error InvalidTradeActionStrategyId();\\n error InvalidTradeActionAmount();\\n error OrderDisabled();\\n error OutDated();\\n\\n struct SourceAndTargetAmounts {\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n struct TradeParams {\\n address trader;\\n TradeTokens tokens;\\n bool byTargetAmount;\\n uint128 constraint;\\n uint256 txValue;\\n Pair pair;\\n uint128 sourceAmount;\\n uint128 targetAmount;\\n }\\n\\n uint256 private constant ONE = 1 << 48;\\n\\n uint256 private constant ORDERS_INVERTED_FLAG = 1 << 255;\\n\\n uint32 private constant DEFAULT_TRADING_FEE_PPM = 2000; // 0.2%\\n\\n // total number of strategies\\n uint128 private _strategyCounter;\\n\\n // the global trading fee (in units of PPM)\\n uint32 internal _tradingFeePPM;\\n\\n // mapping between a strategy to its packed orders\\n mapping(uint256 => uint256[3]) private _packedOrdersByStrategyId;\\n\\n // mapping between a pair id to its strategies ids\\n mapping(uint128 => EnumerableSetUpgradeable.UintSet) private _strategyIdsByPairIdStorage;\\n\\n // accumulated fees per token\\n mapping(Token => uint256) internal _accumulatedFees;\\n\\n // mapping between a pair id to its custom trading fee (in units of PPM)\\n mapping(uint128 pairId => uint32 fee) internal _customTradingFeePPM;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n * @dev triggered when the network fee is updated\\n */\\n event TradingFeePPMUpdated(uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when the custom trading fee for a given pair is updated\\n */\\n event PairTradingFeePPMUpdated(Token indexed token0, Token indexed token1, uint32 prevFeePPM, uint32 newFeePPM);\\n\\n /**\\n * @dev triggered when a strategy is created\\n */\\n event StrategyCreated(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is deleted\\n */\\n event StrategyDeleted(\\n uint256 id,\\n address indexed owner,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1\\n );\\n\\n /**\\n * @dev triggered when a strategy is updated\\n */\\n event StrategyUpdated(\\n uint256 indexed id,\\n Token indexed token0,\\n Token indexed token1,\\n Order order0,\\n Order order1,\\n uint8 reason\\n );\\n\\n /**\\n * @dev triggered when tokens are traded\\n */\\n event TokensTraded(\\n address indexed trader,\\n Token indexed sourceToken,\\n Token indexed targetToken,\\n uint256 sourceAmount,\\n uint256 targetAmount,\\n uint128 tradingFeeAmount,\\n bool byTargetAmount\\n );\\n\\n /**\\n * @dev triggered when fees are withdrawn\\n */\\n event FeesWithdrawn(Token indexed token, address indexed recipient, uint256 indexed amount, address sender);\\n\\n // solhint-disable func-name-mixedcase\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Strategies_init() internal onlyInitializing {\\n __Strategies_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Strategies_init_unchained() internal onlyInitializing {\\n _setTradingFeePPM(DEFAULT_TRADING_FEE_PPM);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @dev creates a new strategy\\n */\\n function _createStrategy(\\n IVoucher voucher,\\n Token[2] memory tokens,\\n Order[2] calldata orders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal returns (uint256) {\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(tokens[0], owner, orders[0].y, value, true);\\n _validateDepositAndRefundExcessNativeToken(tokens[1], owner, orders[1].y, value, true);\\n\\n // store id\\n uint128 counter = _strategyCounter + 1;\\n _strategyCounter = counter;\\n uint256 id = _strategyId(pair.id, counter);\\n _strategyIdsByPairIdStorage[pair.id].add(id);\\n\\n // store orders\\n bool ordersInverted = tokens[0] == pair.tokens[1];\\n _packedOrdersByStrategyId[id] = _packOrders(orders, ordersInverted);\\n\\n // mint voucher\\n voucher.mint(owner, id);\\n\\n // emit event\\n emit StrategyCreated({\\n id: id,\\n owner: owner,\\n token0: tokens[0],\\n token1: tokens[1],\\n order0: orders[0],\\n order1: orders[1]\\n });\\n\\n return id;\\n }\\n\\n /**\\n * @dev updates an existing strategy\\n */\\n function _updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders,\\n Pair memory pair,\\n address owner,\\n uint256 value\\n ) internal {\\n // prepare storage variable\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // revert if the strategy mutated since this tx was sent\\n if (!_equalStrategyOrders(currentOrders, orders)) {\\n revert OutDated();\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(newOrders, ordersInverted);\\n if (packedOrdersMemory[0] != newPackedOrders[0]) {\\n packedOrders[0] = newPackedOrders[0];\\n }\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // deposit and withdraw\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n Token token = sortedTokens[i];\\n if (newOrders[i].y < orders[i].y) {\\n // liquidity decreased - withdraw the difference\\n uint128 delta = orders[i].y - newOrders[i].y;\\n _withdrawFunds(token, payable(owner), delta);\\n } else if (newOrders[i].y > orders[i].y) {\\n // liquidity increased - deposit the difference\\n uint128 delta = newOrders[i].y - orders[i].y;\\n _validateDepositAndRefundExcessNativeToken(token, owner, delta, value, true);\\n }\\n\\n // refund native token when there's no deposit in the order\\n // note that deposit handles refunds internally\\n if (value > 0 && token.isNative() && newOrders[i].y <= orders[i].y) {\\n payable(address(owner)).sendValue(value);\\n }\\n }\\n\\n // emit event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: sortedTokens[0],\\n token1: sortedTokens[1],\\n order0: newOrders[0],\\n order1: newOrders[1],\\n reason: STRATEGY_UPDATE_REASON_EDIT\\n });\\n }\\n\\n /**\\n * @dev deletes a strategy\\n */\\n function _deleteStrategy(uint256 strategyId, IVoucher voucher, Pair memory pair) internal {\\n Strategy memory strategy = _strategy(strategyId, voucher, pair);\\n\\n // burn the voucher nft token\\n voucher.burn(strategy.id);\\n\\n // clear storage\\n delete _packedOrdersByStrategyId[strategy.id];\\n _strategyIdsByPairIdStorage[pair.id].remove(strategy.id);\\n\\n // withdraw funds\\n _withdrawFunds(strategy.tokens[0], payable(strategy.owner), strategy.orders[0].y);\\n _withdrawFunds(strategy.tokens[1], payable(strategy.owner), strategy.orders[1].y);\\n\\n // emit event\\n emit StrategyDeleted({\\n id: strategy.id,\\n owner: strategy.owner,\\n token0: strategy.tokens[0],\\n token1: strategy.tokens[1],\\n order0: strategy.orders[0],\\n order1: strategy.orders[1]\\n });\\n }\\n\\n /**\\n * @dev perform trade, update affected strategies\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function _trade(TradeAction[] calldata tradeActions, TradeParams memory params) internal {\\n bool isTargetToken0 = params.tokens.target == params.pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] storage packedOrders = _packedOrdersByStrategyId[strategyId];\\n uint256[3] memory packedOrdersMemory = packedOrders;\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(params.pair.id, strategyId, amount);\\n\\n (Order memory targetOrder, Order memory sourceOrder) = isTargetToken0 == ordersInverted\\n ? (orders[1], orders[0])\\n : (orders[0], orders[1]);\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n params.byTargetAmount\\n );\\n\\n // handled specifically for a custom error message\\n if (targetOrder.y < targetAmount) {\\n revert InsufficientLiquidity();\\n }\\n\\n // update the orders with the new values\\n // safe since it's checked above\\n unchecked {\\n targetOrder.y -= targetAmount;\\n }\\n\\n sourceOrder.y += sourceAmount;\\n if (sourceOrder.z < sourceOrder.y) {\\n sourceOrder.z = sourceOrder.y;\\n }\\n\\n // store new values if necessary\\n uint256[3] memory newPackedOrders = _packOrders(orders, ordersInverted);\\n\\n // both y values are in slot 0, so it has definitely changed\\n packedOrders[0] = newPackedOrders[0];\\n\\n // one of the z values is in slot 1, so it has possibly changed\\n if (packedOrdersMemory[1] != newPackedOrders[1]) {\\n packedOrders[1] = newPackedOrders[1];\\n }\\n\\n // the other z value has possibly changed only if the first one hasn't\\n if (packedOrdersMemory[2] != newPackedOrders[2]) {\\n packedOrders[2] = newPackedOrders[2];\\n }\\n\\n // emit update event\\n emit StrategyUpdated({\\n id: strategyId,\\n token0: params.pair.tokens[ordersInverted ? 1 : 0],\\n token1: params.pair.tokens[ordersInverted ? 0 : 1],\\n order0: orders[0],\\n order1: orders[1],\\n reason: STRATEGY_UPDATE_REASON_TRADE\\n });\\n\\n params.sourceAmount += sourceAmount;\\n params.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n uint128 tradingFeeAmount;\\n if (params.byTargetAmount) {\\n uint128 amountIncludingFee = _addFee(params.sourceAmount, params.pair.id);\\n tradingFeeAmount = amountIncludingFee - params.sourceAmount;\\n params.sourceAmount = amountIncludingFee;\\n if (params.sourceAmount > params.constraint) {\\n revert GreaterThanMaxInput();\\n }\\n _accumulatedFees[params.tokens.source] += tradingFeeAmount;\\n } else {\\n uint128 amountExcludingFee = _subtractFee(params.targetAmount, params.pair.id);\\n tradingFeeAmount = params.targetAmount - amountExcludingFee;\\n params.targetAmount = amountExcludingFee;\\n if (params.targetAmount < params.constraint) {\\n revert LowerThanMinReturn();\\n }\\n _accumulatedFees[params.tokens.target] += tradingFeeAmount;\\n }\\n\\n // transfer funds\\n _validateDepositAndRefundExcessNativeToken(\\n params.tokens.source,\\n params.trader,\\n params.sourceAmount,\\n params.txValue,\\n false\\n );\\n _withdrawFunds(params.tokens.target, payable(params.trader), params.targetAmount);\\n\\n // tokens traded successfully, emit event\\n emit TokensTraded({\\n trader: params.trader,\\n sourceToken: params.tokens.source,\\n targetToken: params.tokens.target,\\n sourceAmount: params.sourceAmount,\\n targetAmount: params.targetAmount,\\n tradingFeeAmount: tradingFeeAmount,\\n byTargetAmount: params.byTargetAmount\\n });\\n }\\n\\n /**\\n * @dev calculates the required amount plus fee\\n */\\n function _addFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // divide the input amount by `1 - fee`\\n return MathEx.mulDivC(amount, PPM_RESOLUTION, PPM_RESOLUTION - tradingFeePPM).toUint128();\\n }\\n\\n /**\\n * @dev calculates the expected amount minus fee\\n */\\n function _subtractFee(uint128 amount, uint128 pairId) private view returns (uint128) {\\n uint32 tradingFeePPM = _getPairTradingFeePPM(pairId);\\n // multiply the input amount by `1 - fee`\\n return MathEx.mulDivF(amount, PPM_RESOLUTION - tradingFeePPM, PPM_RESOLUTION).toUint128();\\n }\\n\\n /**\\n * @dev get the custom trading fee ppm for a given pair (returns default trading fee if not set for pair)\\n */\\n function _getPairTradingFeePPM(uint128 pairId) internal view returns (uint32) {\\n uint32 customTradingFeePPM = _customTradingFeePPM[pairId];\\n return customTradingFeePPM == 0 ? _tradingFeePPM : customTradingFeePPM;\\n }\\n\\n /**\\n * @dev calculates and returns the total source and target amounts of a trade, including fees\\n */\\n function _tradeSourceAndTargetAmounts(\\n TradeTokens memory tokens,\\n TradeAction[] calldata tradeActions,\\n Pair memory pair,\\n bool byTargetAmount\\n ) internal view returns (SourceAndTargetAmounts memory totals) {\\n bool isTargetToken0 = tokens.target == pair.tokens[0];\\n\\n // process trade actions\\n for (uint256 i = 0; i < tradeActions.length; i = uncheckedInc(i)) {\\n // prepare variables\\n uint128 amount = tradeActions[i].amount;\\n uint256 strategyId = tradeActions[i].strategyId;\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[strategyId];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n _validateTradeParams(pair.id, strategyId, amount);\\n\\n Order memory targetOrder = isTargetToken0 == ordersInverted ? orders[1] : orders[0];\\n\\n // calculate the orders new values\\n (uint128 sourceAmount, uint128 targetAmount) = _singleTradeActionSourceAndTargetAmounts(\\n targetOrder,\\n amount,\\n byTargetAmount\\n );\\n\\n // update totals\\n totals.sourceAmount += sourceAmount;\\n totals.targetAmount += targetAmount;\\n }\\n\\n // apply trading fee\\n if (byTargetAmount) {\\n totals.sourceAmount = _addFee(totals.sourceAmount, pair.id);\\n } else {\\n totals.targetAmount = _subtractFee(totals.targetAmount, pair.id);\\n }\\n }\\n\\n /**\\n * @dev returns stored strategies of a pair\\n */\\n function _strategiesByPair(\\n Pair memory pair,\\n uint256 startIndex,\\n uint256 endIndex,\\n IVoucher voucher\\n ) internal view returns (Strategy[] memory) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n uint256 allLength = strategyIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last value possible\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n Strategy[] memory result = new Strategy[](resultLength);\\n for (uint256 i = 0; i < resultLength; i = uncheckedInc(i)) {\\n uint256 strategyId = strategyIds.at(startIndex + i);\\n result[i] = _strategy(strategyId, voucher, pair);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev returns the count of stored strategies of a pair\\n */\\n function _strategiesByPairCount(Pair memory pair) internal view returns (uint256) {\\n EnumerableSetUpgradeable.UintSet storage strategyIds = _strategyIdsByPairIdStorage[pair.id];\\n return strategyIds.length();\\n }\\n\\n /**\\n @dev returns a strategy object matching the provided id.\\n */\\n function _strategy(uint256 id, IVoucher voucher, Pair memory pair) internal view returns (Strategy memory) {\\n // fetch data\\n address _owner = voucher.ownerOf(id);\\n uint256[3] memory packedOrdersMemory = _packedOrdersByStrategyId[id];\\n (Order[2] memory orders, bool ordersInverted) = _unpackOrders(packedOrdersMemory);\\n\\n // handle sorting\\n Token[2] memory sortedTokens = _sortStrategyTokens(pair, ordersInverted);\\n\\n return Strategy({ id: id, owner: _owner, tokens: sortedTokens, orders: orders });\\n }\\n\\n /**\\n * @dev validates deposit amounts, refunds excess native tokens sent\\n */\\n function _validateDepositAndRefundExcessNativeToken(\\n Token token,\\n address owner,\\n uint256 depositAmount,\\n uint256 txValue,\\n bool validateDepositAmount\\n ) private {\\n if (token.isNative()) {\\n if (txValue < depositAmount) {\\n revert NativeAmountMismatch();\\n }\\n\\n // refund the owner for the remaining native token amount\\n if (txValue > depositAmount) {\\n payable(address(owner)).sendValue(txValue - depositAmount);\\n }\\n } else if (depositAmount > 0) {\\n if (validateDepositAmount) {\\n uint256 prevBalance = token.balanceOf(address(this));\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n uint256 newBalance = token.balanceOf(address(this));\\n if (newBalance - prevBalance != depositAmount) {\\n revert BalanceMismatch();\\n }\\n } else {\\n token.safeTransferFrom(owner, address(this), depositAmount);\\n }\\n }\\n }\\n\\n function _validateTradeParams(uint128 pairId, uint256 strategyId, uint128 tradeAmount) private pure {\\n // make sure the strategy id matches the pair id\\n if (_pairIdByStrategyId(strategyId) != pairId) {\\n revert InvalidTradeActionStrategyId();\\n }\\n\\n // make sure the trade amount is nonzero\\n if (tradeAmount == 0) {\\n revert InvalidTradeActionAmount();\\n }\\n }\\n\\n /**\\n * @dev sets the trading fee (in units of PPM)\\n */\\n function _setTradingFeePPM(uint32 newTradingFeePPM) internal {\\n uint32 prevTradingFeePPM = _tradingFeePPM;\\n if (prevTradingFeePPM == newTradingFeePPM) {\\n return;\\n }\\n\\n _tradingFeePPM = newTradingFeePPM;\\n\\n emit TradingFeePPMUpdated({ prevFeePPM: prevTradingFeePPM, newFeePPM: newTradingFeePPM });\\n }\\n\\n /**\\n * @dev sets the custom trading fee for a given pair (in units of PPM)\\n */\\n function _setPairTradingFeePPM(Pair memory pair, uint32 newCustomTradingFeePPM) internal {\\n uint32 prevCustomTradingFeePPM = _customTradingFeePPM[pair.id];\\n if (prevCustomTradingFeePPM == newCustomTradingFeePPM) {\\n return;\\n }\\n\\n _customTradingFeePPM[pair.id] = newCustomTradingFeePPM;\\n\\n emit PairTradingFeePPMUpdated({\\n token0: pair.tokens[0],\\n token1: pair.tokens[1],\\n prevFeePPM: prevCustomTradingFeePPM,\\n newFeePPM: newCustomTradingFeePPM\\n });\\n }\\n\\n /**\\n * returns true if the provided orders are equal, false otherwise\\n */\\n function _equalStrategyOrders(Order[2] memory orders0, Order[2] memory orders1) internal pure returns (bool) {\\n uint256 i;\\n for (i = 0; i < 2; i = uncheckedInc(i)) {\\n if (\\n orders0[i].y != orders1[i].y ||\\n orders0[i].z != orders1[i].z ||\\n orders0[i].A != orders1[i].A ||\\n orders0[i].B != orders1[i].B\\n ) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n // solhint-disable var-name-mixedcase\\n\\n /**\\n * @dev returns:\\n *\\n * x * (A * y + B * z) ^ 2\\n * ---------------------------------\\n * A * x * (A * y + B * z) + z ^ 2\\n *\\n */\\n function _calculateTradeTargetAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivF(x, B * B, ONE * ONE);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 * x;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp3, A);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivC(temp3, A, factor);\\n\\n (bool safe, uint256 sum) = SafeMath.tryAdd(temp4, temp5);\\n if (safe) {\\n return MathEx.mulDivF(temp2, temp3 / factor, sum);\\n }\\n return temp2 / (A + MathEx.mulDivC(temp1, temp1, temp3));\\n }\\n\\n /**\\n * @dev returns:\\n *\\n * x * z ^ 2\\n * -------------------------------------------\\n * (A * y + B * z) * (A * y + B * z - A * x)\\n *\\n */\\n function _calculateTradeSourceAmount(\\n uint256 x, // < 2 ^ 128\\n uint256 y, // < 2 ^ 128\\n uint256 z, // < 2 ^ 128\\n uint256 A, // < 2 ^ 96\\n uint256 B /// < 2 ^ 96\\n ) private pure returns (uint256) {\\n if (A == 0) {\\n if (B == 0) {\\n revert OrderDisabled();\\n }\\n return MathEx.mulDivC(x, ONE * ONE, B * B);\\n }\\n\\n uint256 temp1;\\n uint256 temp2;\\n unchecked {\\n temp1 = z * ONE; // < 2 ^ 176\\n temp2 = y * A + z * B; // < 2 ^ 225\\n }\\n uint256 temp3 = temp2 - x * A;\\n\\n uint256 factor1 = MathEx.minFactor(temp1, temp1);\\n uint256 factor2 = MathEx.minFactor(temp2, temp3);\\n uint256 factor = Math.max(factor1, factor2);\\n\\n uint256 temp4 = MathEx.mulDivC(temp1, temp1, factor);\\n uint256 temp5 = MathEx.mulDivF(temp2, temp3, factor);\\n return MathEx.mulDivC(x, temp4, temp5);\\n }\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev pack 2 orders into a 3 slot uint256 data structure\\n */\\n function _packOrders(Order[2] memory orders, bool ordersInverted) private pure returns (uint256[3] memory values) {\\n values = [\\n uint256((uint256(orders[0].y) << 0) | (uint256(orders[1].y) << 128)),\\n uint256((uint256(orders[0].z) << 0) | (uint256(orders[0].A) << 128) | (uint256(orders[0].B) << 192)),\\n uint256(\\n (uint256(orders[1].z) << 0) |\\n (uint256(orders[1].A) << 128) |\\n (uint256(orders[1].B) << 192) |\\n (ordersInverted ? ORDERS_INVERTED_FLAG : 0)\\n )\\n ];\\n }\\n\\n /**\\n * @dev unpack 2 stored orders into an array of Order types\\n */\\n function _unpackOrders(\\n uint256[3] memory values\\n ) private pure returns (Order[2] memory orders, bool ordersInverted) {\\n orders = [\\n Order({\\n y: uint128(values[0] >> 0),\\n z: uint128(values[1] >> 0),\\n A: uint64(values[1] >> 128),\\n B: uint64(values[1] >> 192)\\n }),\\n Order({\\n y: uint128(values[0] >> 128),\\n z: uint128(values[2] >> 0),\\n A: uint64(values[2] >> 128),\\n B: uint64((values[2] << 1) >> 193)\\n })\\n ];\\n ordersInverted = values[2] >= ORDERS_INVERTED_FLAG;\\n }\\n\\n /**\\n * @dev expand a given rate\\n */\\n function _expandRate(uint256 rate) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (rate % ONE) << (rate / ONE);\\n }\\n }\\n\\n /**\\n * @dev validates a given rate\\n */\\n function _validRate(uint256 rate) internal pure returns (bool) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n return (ONE >> (rate / ONE)) > 0;\\n }\\n }\\n\\n /**\\n * @dev returns the source and target amounts of a single trade action\\n */\\n function _singleTradeActionSourceAndTargetAmounts(\\n Order memory order,\\n uint128 amount,\\n bool byTargetAmount\\n ) internal pure returns (uint128 sourceAmount, uint128 targetAmount) {\\n uint256 y = uint256(order.y);\\n uint256 z = uint256(order.z);\\n uint256 a = _expandRate(uint256(order.A));\\n uint256 b = _expandRate(uint256(order.B));\\n if (byTargetAmount) {\\n sourceAmount = _calculateTradeSourceAmount(amount, y, z, a, b).toUint128();\\n targetAmount = amount;\\n } else {\\n sourceAmount = amount;\\n targetAmount = _calculateTradeTargetAmount(amount, y, z, a, b).toUint128();\\n }\\n }\\n\\n /**\\n * revert if any of the orders is invalid\\n */\\n function _validateOrders(Order[2] calldata orders) internal pure {\\n for (uint256 i = 0; i < 2; i = uncheckedInc(i)) {\\n if (orders[i].z < orders[i].y) {\\n revert InsufficientCapacity();\\n }\\n if (!_validRate(orders[i].A)) {\\n revert InvalidRate();\\n }\\n if (!_validRate(orders[i].B)) {\\n revert InvalidRate();\\n }\\n }\\n }\\n\\n /**\\n * returns the strategyId for a given pairId and a given strategyIndex\\n */\\n function _strategyId(uint128 pairId, uint128 strategyIndex) internal pure returns (uint256) {\\n return (uint256(pairId) << 128) | strategyIndex;\\n }\\n\\n /**\\n * returns the pairId associated with a given strategyId\\n */\\n function _pairIdByStrategyId(uint256 strategyId) internal pure returns (uint128) {\\n return uint128(strategyId >> 128);\\n }\\n\\n function _withdrawFees(address sender, uint256 amount, Token token, address recipient) internal returns (uint256) {\\n uint256 accumulatedAmount = _accumulatedFees[token];\\n if (accumulatedAmount == 0) {\\n return 0;\\n }\\n if (amount > accumulatedAmount) {\\n amount = accumulatedAmount;\\n }\\n\\n _accumulatedFees[token] = accumulatedAmount - amount;\\n _withdrawFunds(token, payable(recipient), amount);\\n emit FeesWithdrawn(token, recipient, amount, sender);\\n return amount;\\n }\\n\\n /**\\n * returns tokens sorted accordingly to a strategy orders inversion\\n */\\n function _sortStrategyTokens(Pair memory pair, bool ordersInverted) private pure returns (Token[2] memory) {\\n return ordersInverted ? [pair.tokens[1], pair.tokens[0]] : pair.tokens;\\n }\\n\\n /**\\n * sends erc20 or native token to the provided target\\n */\\n function _withdrawFunds(Token token, address payable target, uint256 amount) private {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (token.isNative()) {\\n // using a regular transfer here would revert due to exceeding the 2300 gas limit which is why we're using\\n // call instead (via sendValue), which the 2300 gas limit does not apply for\\n target.sendValue(amount);\\n } else {\\n token.safeTransfer(target, amount);\\n }\\n }\\n\\n function uncheckedInc(uint256 i) private pure returns (uint256 j) {\\n unchecked {\\n j = i + 1;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a93a6e20c3eaca8a03cb960bfe0e5da1b55216655c19ecb59b37a97aeb0a49d\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/carbon/interfaces/ICarbonController.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\nimport { Pair } from \\\"../Pairs.sol\\\";\\nimport { Token } from \\\"../../token/Token.sol\\\";\\nimport { Strategy, TradeAction, Order } from \\\"../Strategies.sol\\\";\\n\\n/**\\n * @dev Carbon Controller interface\\n */\\ninterface ICarbonController is IUpgradeable {\\n /**\\n * @dev returns the type of the controller\\n */\\n function controllerType() external pure returns (uint16);\\n\\n /**\\n * @dev returns the trading fee (in units of PPM)\\n */\\n function tradingFeePPM() external view returns (uint32);\\n\\n /**\\n * @dev returns the trading fee for a given pair (in units of PPM)\\n */\\n function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);\\n\\n /**\\n * @dev creates a new pair of provided token0 and token1\\n */\\n function createPair(Token token0, Token token1) external returns (Pair memory);\\n\\n /**\\n * @dev returns a pair's metadata matching the provided token0 and token1\\n */\\n function pair(Token token0, Token token1) external view returns (Pair memory);\\n\\n /**\\n * @dev returns a list of all supported pairs\\n */\\n function pairs() external view returns (Token[2][] memory);\\n\\n // solhint-disable var-name-mixedcase\\n /**\\n * @dev creates a new strategy, returns the strategy's id\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with assigned liquidity in the order, if any\\n */\\n function createStrategy(Token token0, Token token1, Order[2] calldata orders) external payable returns (uint256);\\n\\n /**\\n * @dev updates an existing strategy\\n *\\n * notes:\\n * - currentOrders should reflect the orders values at the time of sending the tx\\n * this prevents cases in which the strategy was updated due to a trade between\\n * the time the transaction was sent and the time it was mined, thus, giving more\\n * control to the strategy owner.\\n * - reduced liquidity is refunded to the owner\\n * - increased liquidity is deposited\\n * - excess native token is returned to the sender if any\\n * - the sorting of orders is expected to equal the sorting upon creation\\n *\\n * requirements:\\n *\\n * - the caller must have approved the tokens with increased liquidity, if any\\n */\\n function updateStrategy(\\n uint256 strategyId,\\n Order[2] calldata currentOrders,\\n Order[2] calldata newOrders\\n ) external payable;\\n\\n // solhint-enable var-name-mixedcase\\n\\n /**\\n * @dev deletes a strategy matching the provided id\\n *\\n * notes:\\n *\\n * - 100% of liquidity is withdrawn and sent to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the owner of the NFT voucher\\n */\\n function deleteStrategy(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a strategy matching the provided id,\\n * note tokens and orders are returned sorted as provided upon creation\\n */\\n function strategy(uint256 id) external view returns (Strategy memory);\\n\\n /**\\n * @dev returns strategies belonging to a specific pair\\n * note that for the full list of strategies pass 0 to both startIndex and endIndex\\n */\\n function strategiesByPair(\\n Token token0,\\n Token token1,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (Strategy[] memory);\\n\\n /**\\n * @dev returns the count of strategies belonging to a specific pair\\n */\\n function strategiesByPairCount(Token token0, Token token1) external view returns (uint256);\\n\\n /**\\n * @dev performs a trade by specifying a fixed source amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeBySourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 minReturn\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev performs a trade by specifying a fixed target amount\\n *\\n * notes:\\n *\\n * - excess native token is returned to the sender if any\\n *\\n * requirements:\\n *\\n * - the caller must have approved the source token\\n */\\n function tradeByTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions,\\n uint256 deadline,\\n uint128 maxInput\\n ) external payable returns (uint128);\\n\\n /**\\n * @dev returns the source amount required when trading by target amount\\n */\\n function calculateTradeSourceAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the target amount expected when trading by source amount\\n */\\n function calculateTradeTargetAmount(\\n Token sourceToken,\\n Token targetToken,\\n TradeAction[] calldata tradeActions\\n ) external view returns (uint128);\\n\\n /**\\n * @dev returns the amount of fees accumulated for the specified token\\n */\\n function accumulatedFees(Token token) external view returns (uint256);\\n\\n /**\\n * @dev transfers the accumulated fees to the specified recipient\\n *\\n * notes:\\n * `amount` is capped to the available amount\\n * returns the amount withdrawn\\n */\\n function withdrawFees(Token token, uint256 amount, address recipient) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xf495e13cd389a72edea6e37db3ae5b419718eea5efc2cfb48259747c2399ff15\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/token/Token.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\n/**\\n * @dev This type implements ERC20 and SafeERC20 utilities for both the native token and for ERC20 tokens\\n */\\ntype Token is address;\\nusing SafeERC20 for IERC20;\\nusing Address for address payable;\\n\\n// the address that represents the native token reserve\\naddress constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// the symbol that represents the native token\\nstring constant NATIVE_TOKEN_SYMBOL = \\\"ETH\\\";\\n\\n// the decimals for the native token\\nuint8 constant NATIVE_TOKEN_DECIMALS = 18;\\n\\n// the token representing the native token\\nToken constant NATIVE_TOKEN = Token.wrap(NATIVE_TOKEN_ADDRESS);\\n\\nusing {\\n equal as ==,\\n notEqual as !=,\\n isNative,\\n symbol,\\n decimals,\\n balanceOf,\\n allowance,\\n safeTransfer,\\n safeTransferFrom,\\n safeApprove,\\n safeIncreaseAllowance,\\n unsafeTransfer\\n} for Token global;\\n\\n/* solhint-disable func-visibility */\\n\\nfunction equal(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) == Token.unwrap(b);\\n}\\n\\nfunction notEqual(Token a, Token b) pure returns (bool) {\\n return Token.unwrap(a) != Token.unwrap(b);\\n}\\n\\n/**\\n * @dev returns whether the provided token represents an ERC20 or the native token reserve\\n */\\nfunction isNative(Token token) pure returns (bool) {\\n return token == NATIVE_TOKEN;\\n}\\n\\n/**\\n * @dev returns the symbol of the native token/ERC20 token\\n */\\nfunction symbol(Token token) view returns (string memory) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_SYMBOL;\\n }\\n return toERC20(token).symbol();\\n}\\n\\n/**\\n * @dev returns the decimals of the native token/ERC20 token\\n */\\nfunction decimals(Token token) view returns (uint8) {\\n if (isNative(token)) {\\n return NATIVE_TOKEN_DECIMALS;\\n }\\n return toERC20(token).decimals();\\n}\\n\\n/**\\n * @dev returns the balance of the native token/ERC20 token\\n */\\nfunction balanceOf(Token token, address account) view returns (uint256) {\\n if (isNative(token)) {\\n return account.balance;\\n }\\n return toIERC20(token).balanceOf(account);\\n}\\n\\n/**\\n * @dev returns the allowance of an `owner` to a `spender`\\n */\\nfunction allowance(Token token, address owner, address spender) view returns (uint256) {\\n if (isNative(token)) {\\n return 0;\\n }\\n return toIERC20(token).allowance(owner, spender);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n */\\nfunction safeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n if (isNative(token)) {\\n payable(to).transfer(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token from a specific holder using the allowance mechanism\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeTransferFrom(Token token, address from, address to, uint256 amount) {\\n if (amount == 0 || isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeTransferFrom(from, to, amount);\\n}\\n\\n/**\\n * @dev approves a specific amount of the native token/ERC20 token from a specific holder\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeApprove(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeApprove(spender, amount);\\n}\\n\\n/**\\n * @dev atomically increases the allowance granted to `spender` by the caller.\\n *\\n * note that the function does not perform any action if the native token is provided\\n */\\nfunction safeIncreaseAllowance(Token token, address spender, uint256 amount) {\\n if (isNative(token)) {\\n return;\\n }\\n toIERC20(token).safeIncreaseAllowance(spender, amount);\\n}\\n\\n/**\\n * @dev transfers a specific amount of the native token/ERC20 token\\n * @dev forwards all available gas if sending native token\\n */\\nfunction unsafeTransfer(Token token, address to, uint256 amount) {\\n if (amount == 0) {\\n return;\\n }\\n\\n if (isNative(token)) {\\n payable(to).sendValue(amount);\\n } else {\\n toIERC20(token).safeTransfer(to, amount);\\n }\\n}\\n\\n/**\\n * @dev utility function that converts a token to an IERC20\\n */\\nfunction toIERC20(Token token) pure returns (IERC20) {\\n return IERC20(Token.unwrap(token));\\n}\\n\\n/**\\n * @dev utility function that converts a token to an ERC20\\n */\\nfunction toERC20(Token token) pure returns (ERC20) {\\n return ERC20(Token.unwrap(token));\\n}\\n\\n/* solhint-disable func-visibility */\\n\",\"keccak256\":\"0x410b7ec2315aa0631a12c7d37f5ade829d4f1d326834cde1004ddab33ed5049e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Fraction.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nstruct Fraction {\\n uint256 n;\\n uint256 d;\\n}\\n\",\"keccak256\":\"0x84c801ef901e7fd30e99637377b29dfa28c6c1fa140adb5c872fddd8b82fd358\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/MathEx.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Fraction } from \\\"./Fraction.sol\\\";\\n\\nuint256 constant ONE = 0x80000000000000000000000000000000;\\nuint256 constant LN2 = 0x58b90bfbe8e7bcd5e4f1d9cc01f97b57;\\n\\n/**\\n * @dev this library provides a set of complex math operations\\n */\\nlibrary MathEx {\\n error Overflow();\\n\\n /**\\n * @dev returns the largest integer smaller than or equal to `x * y / z`\\n */\\n function mulDivF(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n (uint256 xyhi, uint256 xylo) = _mul512(x, y);\\n\\n // if `x * y < 2 ^ 256`\\n if (xyhi == 0) {\\n return xylo / z;\\n }\\n\\n // assert `x * y / z < 2 ^ 256`\\n if (xyhi >= z) {\\n revert Overflow();\\n }\\n\\n uint256 m = _mulMod(x, y, z); // `m = x * y % z`\\n (uint256 nhi, uint256 nlo) = _sub512(xyhi, xylo, m); // `n = x * y - m` hence `n / z = floor(x * y / z)`\\n\\n // if `n < 2 ^ 256`\\n if (nhi == 0) {\\n return nlo / z;\\n }\\n\\n uint256 p = _unsafeSub(0, z) & z; // `p` is the largest power of 2 which `z` is divisible by\\n uint256 q = _div512(nhi, nlo, p); // `n` is divisible by `p` because `n` is divisible by `z` and `z` is divisible by `p`\\n uint256 r = _inv256(z / p); // `z / p = 1 mod 2` hence `inverse(z / p) = 1 mod 2 ^ 256`\\n return _unsafeMul(q, r); // `q * r = (n / p) * inverse(z / p) = n / z`\\n }\\n }\\n\\n /**\\n * @dev returns the smallest integer larger than or equal to `x * y / z`\\n */\\n function mulDivC(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {\\n uint256 w = mulDivF(x, y, z);\\n if (_mulMod(x, y, z) > 0) {\\n if (w >= type(uint256).max) {\\n revert Overflow();\\n }\\n unchecked {\\n // safe because `w < type(uint256).max`\\n return w + 1;\\n }\\n }\\n return w;\\n }\\n\\n /**\\n * @dev returns the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n */\\n function minFactor(uint256 x, uint256 y) internal pure returns (uint256) {\\n (uint256 hi, uint256 lo) = _mul512(x, y);\\n unchecked {\\n // safe because:\\n // - if `x < 2 ^ 256 - 1` or `y < 2 ^ 256 - 1`\\n // then `hi < 2 ^ 256 - 2`\\n // hence neither `hi + 1` nor `hi + 2` overflows\\n // - if `x = 2 ^ 256 - 1` and `y = 2 ^ 256 - 1`\\n // then `hi = 2 ^ 256 - 2 = ~lo`\\n // hence `hi + 1`, which does not overflow, is computed\\n return hi > ~lo ? hi + 2 : hi + 1;\\n }\\n\\n /* reasoning:\\n |\\n | general:\\n | - find the smallest integer `z` such that `x * y / z <= 2 ^ 256 - 1`\\n | - the value of `x * y` is represented via `2 ^ 256 * hi + lo`\\n | - the expression `~lo` is equivalent to `2 ^ 256 - 1 - lo`\\n | \\n | symbols:\\n | - let `H` denote `hi`\\n | - let `L` denote `lo`\\n | - let `N` denote `2 ^ 256 - 1`\\n | \\n | inference:\\n | `x * y / z <= 2 ^ 256 - 1` <-->\\n | `x * y / (2 ^ 256 - 1) <= z` <-->\\n | `((N + 1) * H + L) / N <= z` <-->\\n | `(N * H + H + L) / N <= z` <-->\\n | `H + (H + L) / N <= z`\\n | \\n | inference:\\n | `0 <= H <= N && 0 <= L <= N` <-->\\n | `0 <= H + L <= N + N` <-->\\n | `0 <= H + L <= N * 2` <-->\\n | `0 <= (H + L) / N <= 2`\\n | \\n | inference:\\n | - `0 = (H + L) / N` --> `H + L = 0` --> `x * y = 0` --> `z = 1 = H + 1`\\n | - `0 < (H + L) / N <= 1` --> `H + (H + L) / N <= H + 1` --> `z = H + 1`\\n | - `1 < (H + L) / N <= 2` --> `H + (H + L) / N <= H + 2` --> `z = H + 2`\\n | \\n | implementation:\\n | - if `hi > ~lo`:\\n | `~L < H <= N` <-->\\n | `N - L < H <= N` <-->\\n | `N < H + L <= N + L` <-->\\n | `1 < (H + L) / N <= 2` <-->\\n | `H + 1 < H + (H + L) / N <= H + 2` <-->\\n | `z = H + 2`\\n | - if `hi <= ~lo`:\\n | `H <= ~L` <-->\\n | `H <= N - L` <-->\\n | `H + L <= N` <-->\\n | `(H + L) / N <= 1` <-->\\n | `H + (H + L) / N <= H + 1` <-->\\n | `z = H + 1`\\n |\\n */\\n }\\n\\n /**\\n * @dev returns `2 ^ f` by calculating `e ^ (f * ln(2))`, where `e` is Euler's number:\\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\\n * - The exponentiation of each binary exponent is given (pre-calculated)\\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\\n */\\n function exp2(Fraction memory f) internal pure returns (Fraction memory) {\\n uint256 x = MathEx.mulDivF(LN2, f.n, f.d);\\n uint256 y;\\n uint256 z;\\n uint256 n;\\n\\n if (x >= (ONE << 4)) {\\n revert Overflow();\\n }\\n\\n unchecked {\\n z = y = x % (ONE >> 3); // get the input modulo 2^(-3)\\n z = (z * y) / ONE;\\n n += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\\n z = (z * y) / ONE;\\n n += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\\n z = (z * y) / ONE;\\n n += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\\n z = (z * y) / ONE;\\n n += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\\n z = (z * y) / ONE;\\n n += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\\n z = (z * y) / ONE;\\n n += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\\n z = (z * y) / ONE;\\n n += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\\n z = (z * y) / ONE;\\n n += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\\n z = (z * y) / ONE;\\n n += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\\n z = (z * y) / ONE;\\n n += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\\n z = (z * y) / ONE;\\n n += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000001c638; // add y^16 * (20! / 16!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\\n z = (z * y) / ONE;\\n n += z * 0x000000000000017c; // add y^18 * (20! / 18!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000014; // add y^19 * (20! / 19!)\\n z = (z * y) / ONE;\\n n += z * 0x0000000000000001; // add y^20 * (20! / 20!)\\n n = n / 0x21c3677c82b40000 + y + ONE; // divide by 20! and then add y^1 / 1! + y^0 / 0!\\n\\n if ((x & (ONE >> 3)) != 0)\\n n = (n * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^(2^-3)\\n if ((x & (ONE >> 2)) != 0)\\n n = (n * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^(2^-2)\\n if ((x & (ONE >> 1)) != 0)\\n n = (n * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^(2^-1)\\n if ((x & (ONE << 0)) != 0)\\n n = (n * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^(2^+0)\\n if ((x & (ONE << 1)) != 0)\\n n = (n * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^(2^+1)\\n if ((x & (ONE << 2)) != 0)\\n n = (n * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^(2^+2)\\n if ((x & (ONE << 3)) != 0)\\n n = (n * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^(2^+3)\\n }\\n\\n return Fraction({ n: n, d: ONE });\\n }\\n\\n /**\\n * @dev returns the value of `x * y`\\n */\\n function _mul512(uint256 x, uint256 y) private pure returns (uint256, uint256) {\\n uint256 p = _mulModMax(x, y);\\n uint256 q = _unsafeMul(x, y);\\n if (p >= q) {\\n unchecked {\\n // safe because `p >= q`\\n return (p - q, q);\\n }\\n }\\n unchecked {\\n // safe because `p < q` hence `_unsafeSub(p, q) > 0`\\n return (_unsafeSub(p, q) - 1, q);\\n }\\n }\\n\\n /**\\n * @dev returns the value of `x - y`\\n */\\n function _sub512(uint256 xhi, uint256 xlo, uint256 y) private pure returns (uint256, uint256) {\\n if (xlo >= y) {\\n unchecked {\\n // safe because `xlo >= y`\\n return (xhi, xlo - y);\\n }\\n }\\n return (xhi - 1, _unsafeSub(xlo, y));\\n }\\n\\n /**\\n * @dev returns the value of `x / pow2n`, given that `x` is divisible by `pow2n`\\n */\\n function _div512(uint256 xhi, uint256 xlo, uint256 pow2n) private pure returns (uint256) {\\n // safe because no `+` or `-` or `*`\\n unchecked {\\n uint256 pow2nInv = _unsafeAdd(_unsafeSub(0, pow2n) / pow2n, 1); // `1 << (256 - n)`\\n return _unsafeMul(xhi, pow2nInv) | (xlo / pow2n); // `(xhi << (256 - n)) | (xlo >> n)`\\n }\\n }\\n\\n /**\\n * @dev returns the inverse of `d` modulo `2 ^ 256`, given that `d` is congruent to `1` modulo `2`\\n */\\n function _inv256(uint256 d) private pure returns (uint256) {\\n // approximate the root of `f(x) = 1 / x - d` using the newton\\u2013raphson convergence method\\n uint256 x = 1;\\n unchecked {\\n // safe because `i < 8`\\n for (uint256 i = 0; i < 8; i++) {\\n x = _unsafeMul(x, _unsafeSub(2, _unsafeMul(x, d))); // `x = x * (2 - x * d) mod 2 ^ 256`\\n }\\n }\\n return x;\\n }\\n\\n /**\\n * @dev returns `(x + y) % 2 ^ 256`\\n */\\n function _unsafeAdd(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x + y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x - y) % 2 ^ 256`\\n */\\n function _unsafeSub(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x - y;\\n }\\n }\\n\\n /**\\n * @dev returns `(x * y) % 2 ^ 256`\\n */\\n function _unsafeMul(uint256 x, uint256 y) private pure returns (uint256) {\\n unchecked {\\n return x * y;\\n }\\n }\\n\\n /**\\n * @dev returns `x * y % (2 ^ 256 - 1)`\\n */\\n function _mulModMax(uint256 x, uint256 y) private pure returns (uint256) {\\n return mulmod(x, y, type(uint256).max);\\n }\\n\\n /**\\n * @dev returns `x * y % z`\\n */\\n function _mulMod(uint256 x, uint256 y, uint256 z) private pure returns (uint256) {\\n return mulmod(x, y, z);\\n }\\n}\\n\",\"keccak256\":\"0x2ff481334338c5d5b13f918a3a58dfebb9ec3329848117acd7ac7e63382664c5\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/OnlyProxyDelegate.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev restrict delegation\\n */\\nabstract contract OnlyProxyDelegate {\\n address private immutable _proxy;\\n\\n error UnknownDelegator();\\n\\n constructor(address proxy) {\\n _proxy = proxy;\\n }\\n\\n modifier onlyProxyDelegate() {\\n _onlyProxyDelegate();\\n\\n _;\\n }\\n\\n function _onlyProxyDelegate() internal view {\\n if (address(this) != _proxy) {\\n revert UnknownDelegator();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x47a46b82fc8870eda785f8f0c7c9839a93c1503103d081d493e6ee42fefc3bb0\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200650638038062006506833981016040819052620000349162000893565b6001600160a01b0381166080526200004c826200006b565b6001600160a01b03821660a0526200006362000096565b505062000903565b6001600160a01b038116620000935760405163e6c4247b60e01b815260040160405180910390fd5b50565b600054610100900460ff1615808015620000b75750600054600160ff909116105b80620000d35750303b158015620000d3575060005460ff166001145b6200013c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000160576000805461ff0019166101001790555b6200016a620001b3565b801562000093576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600054610100900460ff166200020f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b6200021962000243565b62000223620002a9565b6200022d6200030f565b620002376200037f565b62000241620003e5565b565b600054610100900460ff166200029f5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002416200047c565b600054610100900460ff16620003055760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620004d8565b600054610100900460ff166200036b5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620003756200047c565b6200024162000541565b600054610100900460ff16620003db5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b62000241620005f8565b600054610100900460ff16620004415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002417f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16600080516020620064c68339815191526200065c565b600054610100900460ff16620002415760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600054610100900460ff16620005345760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620002416107d0620006a7565b600054610100900460ff166200059d5760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b620005ab60016006620008d2565b61012d805461ffff191661ffff92909216919091179055620005dd600080516020620064c6833981519152806200065c565b62000241600080516020620064c6833981519152336200072c565b600054610100900460ff16620006545760405162461bcd60e51b815260206004820152602b6024820152600080516020620064e683398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000133565b600161015f55565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655463ffffffff600160801b90910481169082168103620006c7575050565b6065805463ffffffff60801b1916600160801b63ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b6200073882826200073c565b5050565b62000748828262000767565b600082815260fb602052604090206200076290826200080b565b505050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166200073857600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620007c73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000822836001600160a01b0384166200082b565b90505b92915050565b6000818152600183016020526040812054620008745750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000825565b50600062000825565b6001600160a01b03811681146200009357600080fd5b60008060408385031215620008a757600080fd5b8251620008b4816200087d565b6020840151909250620008c7816200087d565b809150509250929050565b61ffff828116828216039080821115620008fc57634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a051615b7a6200094c600039600081816108b401528181610d2101528181610dcb01528181610f33015281816111a501526111ff015260006113580152615b7a6000f3fe6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6107d0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x6080604052600436106102195760003560e01c806391d148541161011d578063ca15c873116100b0578063f2bda26d1161007f578063f74dad8111610064578063f74dad811461069a578063fcf66664146106c7578063ffb0a4a0146106e757600080fd5b8063f2bda26d14610667578063f727473a1461068757600080fd5b8063ca15c873146105e5578063d547741f14610605578063f06f8acd14610625578063f1c5e0141461065457600080fd5b8063b76040cd116100ec578063b76040cd1461054f578063ba0a868b14610563578063bc88d7e414610598578063c9c65396146105c557600080fd5b806391d14854146104a157806393867fb5146104e75780639ba372c21461051a578063a217fddf1461053a57600080fd5b806336568abe116101b05780638129fc1c1161017f578063873020371161016457806387302037146104295780638cd2403d146104495780639010d07c1461046957600080fd5b80638129fc1c146103e75780638672d545146103fc57600080fd5b806336568abe1461036457806354fd4d501461038457806355817d1d146103a757806369a4dea7146103c757600080fd5b80632ab2fad1116101ec5780632ab2fad1146102d15780632c40de1b146102f15780632f2ff15d14610324578063322cf8441461034457600080fd5b806301ffc9a71461021e578063102ee9ba1461025357806321589fa11461027e578063248a9ca314610293575b600080fd5b34801561022a57600080fd5b5061023e610239366004614fef565b610709565b60405190151581526020015b60405180910390f35b6102666102613660046150a7565b610765565b6040516001600160801b03909116815260200161024a565b61029161028c36600461513a565b610877565b005b34801561029f57600080fd5b506102c36102ae36600461517a565b600090815260c9602052604090206001015490565b60405190815260200161024a565b3480156102dd57600080fd5b506102666102ec366004615193565b6109e3565b3480156102fd57600080fd5b507f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b166102c3565b34801561033057600080fd5b5061029161033f3660046151f8565b610a3d565b34801561035057600080fd5b506102c361035f366004615228565b610a62565b34801561037057600080fd5b5061029161037f3660046151f8565b610a85565b34801561039057600080fd5b5060065b60405161ffff909116815260200161024a565b3480156103b357600080fd5b506102916103c236600461526a565b610b16565b3480156103d357600080fd5b506102916103e23660046152a8565b610b69565b3480156103f357600080fd5b50610291610ba6565b34801561040857600080fd5b5061041c610417366004615228565b610cc6565b60405161024a91906152ef565b34801561043557600080fd5b5061029161044436600461517a565b610ce9565b34801561045557600080fd5b50610291610464366004615313565b610dfc565b34801561047557600080fd5b50610489610484366004615385565b610e69565b6040516001600160a01b03909116815260200161024a565b3480156104ad57600080fd5b5061023e6104bc3660046151f8565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104f357600080fd5b507f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b34801561052657600080fd5b506102c36105353660046153a7565b610e81565b34801561054657600080fd5b506102c3600081565b34801561055b57600080fd5b506001610394565b34801561056f57600080fd5b5061058361057e366004615228565b610ef8565b60405163ffffffff909116815260200161024a565b3480156105a457600080fd5b506105b86105b336600461517a565b610f14565b60405161024a919061548b565b3480156105d157600080fd5b5061041c6105e0366004615228565b610f58565b3480156105f157600080fd5b506102c361060036600461517a565b610f91565b34801561061157600080fd5b506102916106203660046151f8565b610fa8565b34801561063157600080fd5b50606554700100000000000000000000000000000000900463ffffffff16610583565b6102666106623660046150a7565b610fcd565b34801561067357600080fd5b50610266610682366004615193565b61107b565b6102c361069536600461549a565b6110d1565b3480156106a657600080fd5b506106ba6106b53660046154da565b6111dd565b60405161024a9190615520565b3480156106d357600080fd5b506102c36106e236600461556f565b611223565b3480156106f357600080fd5b506106fc61124c565b60405161024a919061558c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061075f575061075f8261125b565b92915050565b600061076f6112f2565b61077761134d565b61078487878534866113b1565b610796876001600160a01b0316611444565b156107de57816001600160801b03163410156107de576040517f7038b89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107ea888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b166020828101919091528201526001918101919091526001600160801b038516606082015234608082015260a08101829052600060c0820181905260e082015290915061085b87878361150f565b60c0015191505061086d600161015f55565b9695505050505050565b61087f6112f2565b61088761134d565b600061089b6108968560801c90565b611ad4565b6040516331a9108f60e11b8152600481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906155d9565b6001600160a01b0316336001600160a01b03161461095857604051634ca8886760e01b815260040160405180910390fd5b600034118015610984575060208101516109829060005b60200201516001600160a01b0316611444565b155b801561099d5750602081015161099b90600161096f565b155b156109bb57604051631334bf4f60e11b815260040160405180910390fd5b6109c482611bac565b6109d2848484843334611d38565b506109de600161015f55565b505050565b60006109ef8585612150565b60006109fb868661146b565b604080518082019091526001600160a01b038089168252871660208201529091506000610a2b82878786856121af565b6020015193505050505b949350505050565b600082815260c96020526040902060010154610a5881612373565b6109de838361237d565b6000610a6e8383612150565b6000610a7a848461146b565b9050610a358161239f565b6001600160a01b0381163314610b085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610b1282826123c1565b5050565b610b407f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b4a81612426565b6000610b56858561146b565b9050610b628184612469565b5050505050565b610b937f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096336123e3565b80610b9d81612426565b610b1282612552565b600054610100900460ff1615808015610bc65750600054600160ff909116105b80610be05750303b158015610be0575060005460ff166001145b610c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610aff565b6000805460ff191660011790558015610c75576000805461ff0019166101001790555b610c7d612608565b8015610cc3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610cce614e6a565b610cd88383612150565b610ce2838361146b565b9392505050565b610cf16112f2565b610cf961134d565b6000610d086108968360801c90565b6040516331a9108f60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9491906155d9565b6001600160a01b0316336001600160a01b031614610dc557604051634ca8886760e01b815260040160405180910390fd5b610df0827f00000000000000000000000000000000000000000000000000000000000000008361269b565b50610cc3600161015f55565b61012d54600090610e129061ffff166001615622565b905061ffff8116600614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61012d805461ffff191661ffff8316179055505050565b600082815260fb60205260408120610ce2908361285a565b60007f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16610eae81336123e3565b82610eb881612866565b85610ec281612866565b85610ecc816128a6565b610ed46112f2565b610ee033888a896128e0565b9450610eed600161015f55565b505050509392505050565b600080610f05848461146b565b9050610a358160000151612994565b610f1c614e92565b6000610f2b6108968460801c90565b9050610ce2837f0000000000000000000000000000000000000000000000000000000000000000836129e3565b610f60614e6a565b610f686112f2565b610f7061134d565b610f7a8383612150565b610f848383612ae4565b905061075f600161015f55565b600081815260fb6020526040812061075f90612c46565b600082815260c96020526040902060010154610fc381612373565b6109de83836123c1565b6000610fd76112f2565b610fdf61134d565b610fec87878534866113b1565b6000610ff8888861146b565b6040805161010081018252338152815180830183526001600160a01b038c811682528b1660208281019190915282015260009181018290526001600160801b038616606082015234608082015260a0810183905260c0810182905260e081019190915290915061106987878361150f565b60e0015191505061086d600161015f55565b60006110878585612150565b6000611093868661146b565b604080518082019091526001600160a01b0380891682528716602082015290915060006110c48287878660016121af565b5198975050505050505050565b60006110db6112f2565b6110e361134d565b6110ed8484612150565b60003411801561110c575061110a846001600160a01b0316611444565b155b80156111275750611125836001600160a01b0316611444565b155b1561114557604051631334bf4f60e11b815260040160405180910390fd5b61114e82611bac565b611156614e6a565b6111608585612c50565b6111755761116e8585612ae4565b9050611182565b61117f858561146b565b90505b604080518082019091526001600160a01b038087168252851660208201526111ce7f00000000000000000000000000000000000000000000000000000000000000008286853334612cb3565b92505050610ce2600161015f55565b60606111e98585612150565b60006111f5868661146b565b905061086d8185857f0000000000000000000000000000000000000000000000000000000000000000612ee0565b60008161122f81612866565b50506001600160a01b031660009081526068602052604090205490565b6060611256613025565b905090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061075f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461075f565b600261015f54036113455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610aff565b600261015f55565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113af576040517fd0c8bfe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b428310156113eb576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113fd816001600160801b03166128a6565b6114078585612150565b6000821180156114265750611424856001600160a01b0316611444565b155b15610b6257604051631334bf4f60e11b815260040160405180910390fd5b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461075f565b611473614e6a565b61147d8383612c50565b6114b3576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114bf8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352928152908290205482518084019093526001600160801b03168252810191909152949350505050565b600061154e8260200151602001518360a0015160200151600060028110611538576115386155f6565b60200201516001600160a01b0390811691161490565b905060005b8381101561184a57600085858381811061156f5761156f6155f6565b9050604002016020016020810190611587919061563d565b9050600086868481811061159d5761159d6155f6565b60409081029290920135600081815260666020528381208451606081019586905292955093909250839060039082845b8154815260200190600101908083116115cd57505050505090506000806115f3836131aa565b9150915061160a8960a0015160000151868861329e565b6000808215158a151514611624578351602085015161162c565b602084015184515b91509150600080611642848b8f60400151613335565b91509150806001600160801b031684600001516001600160801b03161015611696576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83518190036001600160801b031684528251829084906116b7908390615658565b6001600160801b03908116909152845160208601519082169116101590506116ea5782516001600160801b031660208401525b60006116f68787613411565b80518a55602080820151908a01519192501461171757602081015160018a01555b604080820151908901511461173157604081015160028a01555b8d60a001516020015186611746576001611749565b60005b60ff166002811061175c5761175c6155f6565b60200201516001600160a01b03168e60a00151602001518761177f576000611782565b60015b60ff1660028110611795576117956155f6565b60200201516001600160a01b03168b7f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d8a600060200201518b6001602002015160016040516117e693929190615678565b60405180910390a4828e60c0018181516118009190615658565b6001600160801b031690525060e08e018051839190611820908390615658565b6001600160801b03169052506118439a508b995061353f98505050505050505050565b9050611553565b50600082604001511561191857600061186f8460c001518560a0015160000151613545565b90508360c00151816118819190615716565b6001600160801b0380831660c087018190526060870151929450911610156118d5576040517f0699263d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080850151516001600160a01b0316600090815260689091526040812080546001600160801b038516929061190c908490615736565b909155506119d6915050565b60006119308460e001518560a001516000015161357c565b9050808460e001516119429190615716565b6001600160801b0380831660e08701819052606087015192945091161115611996576040517ff602de8f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808501518101516001600160a01b0316600090815260689091526040812080546001600160801b03851692906119cf908490615736565b9091555050505b611a0183602001516000015184600001518560c001516001600160801b0316866080015160006135b6565b611a2583602001516020015184600001518560e001516001600160801b03166136de565b8260200151602001516001600160a01b03168360200151600001516001600160a01b031684600001516001600160a01b03167f95f3b01351225fea0e69a46f68b164c9dea10284f12cd4a907ce66510ab7af6a8660c001518760e00151868960400151604051611abd94939291906001600160801b039485168152928416602084015292166040820152901515606082015260800190565b60405180910390a45050505050565b600161015f55565b611adc614e6a565b6001600160801b0382166000908152603560205260408082208151808301928390529160029082845b81546001600160a01b03168152600190910190602001808311611b05575050505050905060006001600160a01b031681600060028110611b4757611b476155f6565b60200201516001600160a01b031603611b8c576040517fc5fc4bf400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526001600160801b03909316835260208301525090565b60005b6002811015610b1257818160028110611bca57611bca6155f6565b608002016000016020810190611be0919061563d565b6001600160801b0316828260028110611bfb57611bfb6155f6565b608002016020016020810190611c11919061563d565b6001600160801b03161015611c52576040517f5cef583a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c99828260028110611c6757611c676155f6565b608002016040016020810190611c7d9190615761565b67ffffffffffffffff166601000000000000908190041c151590565b611ccf576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cfa828260028110611ce457611ce46155f6565b608002016060016020810190611c7d9190615761565b611d30576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611baf565b60008681526066602052604080822081516060810192839052909291839060039082845b815481526020019060010190808311611d5c5750505050509050600080611d82836131aa565b604080518082019091529193509150611dd2908a60026000835b82821015611dc857611db960808302850136819003810190615792565b81526020019060010190611d9c565b5050505083613729565b611e08576040517f811cb74a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152600090611e55908a600284835b82821015611e4b57611e3c60808302850136819003810190615792565b81526020019060010190611e1f565b5050505083613411565b8051855191925014611e6657805185555b6020808201519085015114611e8057602081015160018601555b6040808201519085015114611e9a57604081015160028601555b6000611ea68984613888565b905060005b60028110156120e8576000828260028110611ec857611ec86155f6565b60200201519050858260028110611ee157611ee16155f6565b6020020151516001600160801b03168c8360028110611f0257611f026155f6565b608002016000016020810190611f18919061563d565b6001600160801b03161015611f8f5760008c8360028110611f3b57611f3b6155f6565b608002016000016020810190611f51919061563d565b878460028110611f6357611f636155f6565b602002015151611f739190615716565b9050611f89828c836001600160801b03166136de565b5061204e565b858260028110611fa157611fa16155f6565b6020020151516001600160801b03168c8360028110611fc257611fc26155f6565b608002016000016020810190611fd8919061563d565b6001600160801b0316111561204e576000868360028110611ffb57611ffb6155f6565b6020020151518d8460028110612013576120136155f6565b608002016000016020810190612029919061563d565b6120339190615716565b905061204c828c836001600160801b03168d60016135b6565b505b60008911801561206b575061206b816001600160a01b0316611444565b80156120c75750858260028110612084576120846155f6565b6020020151516001600160801b03168c83600281106120a5576120a56155f6565b6080020160000160208101906120bb919061563d565b6001600160801b031611155b156120df576120df6001600160a01b038b168a61390b565b50600101611eab565b50602081015181516040516001600160a01b0392831692909116908e907f720da23a5c920b1d8827ec83c4d3c4d90d9419eadb0036b88cb4c2ffa91aef7d9061213a908f90608082019060009061587c565b60405180910390a4505050505050505050505050565b8161215a81612866565b8161216481612866565b6001600160a01b03808516908416036121a9576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080518082019091526000808252602082015260006121e487602001518560200151600060028110611538576115386155f6565b905060005b85811015612323576000878783818110612205576122056155f6565b905060400201602001602081019061221d919061563d565b90506000888884818110612233576122336155f6565b60409081029290920135600081815260666020528381208451606081019586905292955090939192509060039082845b8154815260200190600101908083116122635750505050509050600080612289836131aa565b9150915061229c8a60000151858761329e565b6000811515881515146122b05782516122b6565b60208301515b90506000806122c683898e613335565b91509150818b6000018181516122dc9190615658565b6001600160801b031690525060208b0180518291906122fc908390615658565b6001600160801b031690525061231c975088965061353f95505050505050565b90506121e9565b50821561234857815184516123389190613545565b6001600160801b03168252612369565b61235a8260200151856000015161357c565b6001600160801b031660208301525b5095945050505050565b610cc38133613a24565b6123878282613a99565b600082815260fb602052604090206109de9082613b3b565b80516001600160801b03166000908152606760205260408120610ce281612c46565b6123cb8282613b50565b600082815260fb602052604090206109de9082613bd3565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257604051634ca8886760e01b815260040160405180910390fd5b620f424063ffffffff82161115610cc3576040517f58d620b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81516001600160801b031660009081526069602052604090205463ffffffff908116908216810361249957505050565b82516001600160801b03166000908152606960209081526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff861617905580850151908101516001600160a01b03169160200201516001600160a01b03167f831434d05f3ad5f63be733ea463b2933c70d2162697fd200a22b5d56f5c454b6838560405161254592919063ffffffff92831681529116602082015260400190565b60405180910390a3505050565b60655463ffffffff7001000000000000000000000000000000009091048116908216810361257e575050565b606580547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff8581169182029290921790925560408051918416825260208201929092527f66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465910160405180910390a15050565b600054610100900460ff166126735760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b61267b613be8565b612683613c5b565b61268b613cce565b612693613d49565b6113af613dbc565b60006126a88484846129e3565b80516040517f42966c680000000000000000000000000000000000000000000000000000000081529192506001600160a01b038516916342966c68916126f49160040190815260200190565b600060405180830381600087803b15801561270e57600080fd5b505af1158015612722573d6000803e3d6000fd5b50508251600090815260666020526040812081815560018101829055600201555061274a9050565b805182516001600160801b0316600090815260676020526040902061276e91613e71565b506040810151516020820151606083015161279c92919060005b6020020151516001600160801b03166136de565b60408101516020908101519082015160608301516127bd9291906001612788565b604081015160208101516001600160a01b031690600060200201516001600160a01b031682602001516001600160a01b03167f4d5b6e0627ea711d8e9312b6ba56f50e0b51d41816fd6fd38643495ac81d38b68460000151856060015160006002811061282c5761282c6155f6565b602002015160608701516001602002015160405161284c93929190615898565b60405180910390a450505050565b6000610ce28383613e7d565b6001600160a01b038116610cc3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610cc3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660009081526068602052604081205480820361290a576000915050610a35565b80851115612916578094505b612920858261592f565b6001600160a01b0385166000908152606860205260409020556129448484876136de565b6040516001600160a01b0387811682528691818616918716907f2f4e8fcae66f01952d258445c03f43cf56d3ce389e017ecd2afa8a79e77175889060200160405180910390a45092949350505050565b6001600160801b03811660009081526069602052604081205463ffffffff1680156129bf5780610ce2565b5050606554700100000000000000000000000000000000900463ffffffff16919050565b6129eb614e92565b6040516331a9108f60e11b8152600481018590526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015612a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5791906155d9565b600086815260666020526040808220815160608101928390529394509192919060039082845b815481526020019060010190808311612a7d5750505050509050600080612aa3836131aa565b915091506000612ab38783613888565b604080516080810182528b81526001600160a01b039097166020880152860152505060608301525090509392505050565b612aec614e6a565b612af68383612c50565b15612b2d576040517fc9bb25eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b398484613144565b603354909150600090612b56906001600160801b03166001615658565b603380546fffffffffffffffffffffffffffffffff19166001600160801b0383169081179091556000908152603560205260409020909150612b9a90836002614ebe565b5081516001600160a01b039081166000908152603460209081526040808320828701805186168552925280832080546fffffffffffffffffffffffffffffffff19166001600160801b0387169081179091559151865191519085169491909116927f6365c594f5448f79c1cc1e6f661bdbf1d16f2e8f85747e13f8e80f1fd168b7c391a46040518060400160405280826001600160801b03168152602001838152509250505092915050565b600061075f825490565b600080612c5d8484613144565b80516001600160a01b039081166000908152603460209081526040808320828601519094168352929052908120549192506001600160801b039091169003612ca957600091505061075f565b5060019392505050565b8451600090612ce7908487845b608002016000016020810190612cd6919061563d565b6001600160801b03168560016135b6565b6020860151612cf99084876001612cc0565b606554600090612d13906001600160801b03166001615658565b606580546001600160801b0383166fffffffffffffffffffffffffffffffff199182168117909255875192935060009260801b161786516001600160801b03166000908152606760205260409020909150612d6e9082613ea7565b5087516020870151600091612d84916001611538565b60408051808201909152909150612dd2908960026000835b82821015612dc857612db960808302850136819003810190615792565b81526020019060010190612d9c565b5050505082613411565b6000838152606660205260409020612deb916003614f2a565b506040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490528b16906340c10f1990604401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b5050505088600160028110612e7a57612e7a6155f6565b602002015189516040516001600160a01b0392831692918216918916907fff24554f8ccfe540435cfc8854831f8dcf1cf2068708cfaf46e8b52a4ccc4c8d90612ecb9087908e906080820190615942565b60405180910390a45098975050505050505050565b83516001600160801b03166000908152606760205260408120606091612f0582612c46565b9050841580612f1357508085115b15612f1c578094505b84861115612f56576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612f62878761592f565b905060008167ffffffffffffffff811115612f7f57612f7f61577c565b604051908082528060200260200182016040528015612fb857816020015b612fa5614e92565b815260200190600190039081612f9d5790505b50905060005b82811015613018576000612fdc612fd5838c615736565b879061285a565b9050612fe981898d6129e3565b838381518110612ffb57612ffb6155f6565b6020026020010181905250506130118160010190565b9050612fbe565b5098975050505050505050565b6033546060906001600160801b031660008167ffffffffffffffff81111561304f5761304f61577c565b60405190808252806020026020018201604052801561308857816020015b613075614f58565b81526020019060019003908161306d5790505b50905060005b826001600160801b0316816001600160801b0316101561313d57603560006130b7836001615658565b6001600160801b03168152602081019190915260409081016000208151808301928390529160029082845b81546001600160a01b031681526001909101906020018083116130e257505050505082826001600160801b03168151811061311f5761311f6155f6565b6020026020010181905250808061313590615964565b91505061308e565b5092915050565b61314c614f58565b816001600160a01b0316836001600160a01b03161061318857604080518082019091526001600160a01b03808416825284166020820152610ce2565b50604080518082019091526001600160a01b0392831681529116602082015290565b6131b2614f76565b6040805160c0808201835284516001600160801b0390811683850190815260208088018051841660608701528051608090811c67ffffffffffffffff1681880152905190941c60a0860152908452845180840186528751841c8152878601519092168282015260009490840192908201908760026020020151901c67ffffffffffffffff16815260200160c1600188600260038110613253576132536155f6565b6020020151901b901c67ffffffffffffffff169052905291507f8000000000000000000000000000000000000000000000000000000000000000836002602002015110159050915091565b826001600160801b03166132b28360801c90565b6001600160801b0316146132f2576040517fb7b067f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b03166000036109de576040517feb1a139600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600085600001516001600160801b03169050600086602001516001600160801b031690506000613388886040015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905060006133b6896060015167ffffffffffffffff1665ffffffffffff811666010000000000009091041b90565b905086156133e6576133dc6133d7896001600160801b031686868686613eb3565b613fb2565b9550879450613405565b8795506134026133d7896001600160801b031686868686614035565b94505b50505050935093915050565b613419614fbc565b604080516060808201835260208681015151875151608091821b6fffffffffffffffffffffffffffffffff19166001600160801b03918216178552885193840151848701519484015160c09190911b7fffffffffffffffff000000000000000000000000000000000000000000000000169490921b77ffffffffffffffff00000000000000000000000000000000169116179190911790820152908101836134c25760006134e4565b7f80000000000000000000000000000000000000000000000000000000000000005b60c086600160200201516060015167ffffffffffffffff16901b608087600160200201516040015167ffffffffffffffff16901b60008860016020020151602001516001600160801b0316901b171717815250905092915050565b60010190565b60008061355183612994565b9050610a356133d76001600160801b038616620f4240613571858261598a565b63ffffffff16614174565b60008061358883612994565b9050610a356133d76001600160801b0386166135a784620f424061598a565b63ffffffff16620f42406141dc565b6135c8856001600160a01b0316611444565b156136315782821015613607576040517f677606af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282111561362c5761362c61361c848461592f565b6001600160a01b0386169061390b565b610b62565b8215610b625780156136c95760006136526001600160a01b038716306142d0565b90506136696001600160a01b038716863087614377565b600061367e6001600160a01b038816306142d0565b90508461368b838361592f565b146136c2576040517fca3e0a6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050610b62565b610b626001600160a01b038616853086614377565b806000036136eb57505050565b6136fd836001600160a01b0316611444565b15613715576109de6001600160a01b0383168261390b565b6109de6001600160a01b03841683836143a1565b6000805b6002811015612ca957828160028110613748576137486155f6565b6020020151516001600160801b0316848260028110613769576137696155f6565b6020020151516001600160801b03161415806137cb5750828160028110613792576137926155f6565b6020020151602001516001600160801b03168482600281106137b6576137b66155f6565b6020020151602001516001600160801b031614155b8061381e57508281600281106137e3576137e36155f6565b60200201516040015167ffffffffffffffff16848260028110613808576138086155f6565b60200201516040015167ffffffffffffffff1614155b806138715750828160028110613836576138366155f6565b60200201516060015167ffffffffffffffff1684826002811061385b5761385b6155f6565b60200201516060015167ffffffffffffffff1614155b1561388057600091505061075f565b60010161372d565b613890614f58565b8161389f578260200151610ce2565b604051806040016040528084602001516001600281106138c1576138c16155f6565b60200201516001600160a01b03166001600160a01b0316815260200184602001516000600281106138f4576138f46155f6565b60200201516001600160a01b031690529392505050565b8047101561395b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610aff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50509050806109de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610aff565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257613a5781614406565b613a62836020614418565b604051602001613a739291906159e1565b60408051601f198184030181529082905262461bcd60e51b8252610aff91600401615a62565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff16610b1257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613af73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ce2836001600160a01b038416614641565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1615610b1257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ce2836001600160a01b038416614690565b600054610100900460ff16613c535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614783565b600054610100900460ff16613cc65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6147ee565b600054610100900460ff16613d395760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b613d41614783565b6113af614864565b600054610100900460ff16613db45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af614946565b600054610100900460ff16613e275760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af7f24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b167f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966149b1565b6000610ce28383614690565b6000826000018281548110613e9457613e946155f6565b9060005260206000200154905092915050565b6000610ce28383614641565b600082600003613f225781600003613ef7576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b86613f0c660100000000000080615a95565b613f168580615a95565b614174565b9050613fa9565b66010000000000008402858402838602016000613f3f868a615a95565b613f49908361592f565b90506000613f5784856149fc565b90506000613f6584846149fc565b90506000613f738383614a2b565b90506000613f82878884614174565b90506000613f918787856141dc565b9050613f9e8e8383614174565b985050505050505050505b95945050505050565b60006001600160801b038211156140315760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610aff565b5090565b60008260000361409d5781600003614079576040517f4e305c4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613f1b866140878480615a95565b614098660100000000000080615a95565b6141dc565b660100000000000084028584028386020160006140ba8983615a95565b905060006140c884856149fc565b905060006140d683896149fc565b905060006140e48383614a2b565b905060006140f3878884614174565b90506000614102868c85614174565b90506000806141118484614a41565b9150915081156141405761412f89614129878b615aac565b836141dc565b9a5050505050505050505050613fa9565b61414b8a8b8a614174565b614155908e615736565b61415f908a615aac565b9a505050505050505050505095945050505050565b6000806141828585856141dc565b90506000614191868686614a6a565b1115610a355760001981106141d2576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001019050610ce2565b60008060006141eb8686614a85565b915091508160000361421057838181614206576142066159a7565b0492505050610ce2565b838210614249576040517f35278d1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614256878787614a6a565b9050600080614266858585614abe565b915091508160000361428e57868181614281576142816159a7565b0495505050505050610ce2565b60008781038816906142a1848484614aee565b905060006142bd838b816142b7576142b76159a7565b04614b2b565b919091029b9a5050505050505050505050565b60006142db83611444565b156142f157506001600160a01b0381163161075f565b826040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291909116906370a0823190602401602060405180830381865afa158015614353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce29190615ace565b801580614388575061438884611444565b6121a9576121a96001600160a01b038516848484614b4c565b806000036143ae57505050565b6143b783611444565b156143f2576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121a9573d6000803e3d6000fd5b6109de6001600160a01b0384168383614bfd565b606061075f6001600160a01b03831660145b60606000614427836002615a95565b614432906002615736565b67ffffffffffffffff81111561444a5761444a61577c565b6040519080825280601f01601f191660200182016040528015614474576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106144ab576144ab6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061450e5761450e6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061454a846002615a95565b614555906001615736565b90505b60018111156145f2577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614596576145966155f6565b1a60f81b8282815181106145ac576145ac6155f6565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936145eb81615ae7565b9050614558565b508315610ce25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aff565b60008181526001830160205260408120546146885750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561075f565b50600061075f565b600081815260018301602052604081205480156147795760006146b460018361592f565b85549091506000906146c89060019061592f565b905081811461472d5760008660000182815481106146e8576146e86155f6565b906000526020600020015490508087600001848154811061470b5761470b6155f6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061473e5761473e615afe565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061075f565b600091505061075f565b600054610100900460ff166113af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600054610100900460ff166148595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6113af6107d0612552565b600054610100900460ff166148cf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b6148db60016006615b14565b61012d805461ffff191661ffff9290921691909117905561491c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096806149b1565b6113af7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633614c46565b600054610100900460ff16611acc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610aff565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000806000614a0b8585614a85565b9150915080198211614a205781600101613fa9565b506002019392505050565b6000818311614a3a5781610ce2565b5090919050565b60008083830184811015614a5c576000809250925050614a63565b6001925090505b9250929050565b60008180614a7a57614a7a6159a7565b838509949350505050565b6000806000614a948585614c50565b9050848402808210614aad579081900392509050614a63565b600181830303969095509350505050565b600080828410614ad45750839050818303614ae6565b614adf60018661592f565b9150508183035b935093915050565b600080614b0c8380830381614b0557614b056159a7565b0460010190565b9050828481614b1d57614b1d6159a7565b048186021795945050505050565b60006001815b600881101561313d5783820260020382029150600101614b31565b6040516001600160a01b03808516602483015283166044820152606481018290526121a99085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614c5f565b6040516001600160a01b0383166024820152604481018290526109de9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401614b99565b610b12828261237d565b60006000198284099392505050565b6000614cb4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d479092919063ffffffff16565b9050805160001480614cd5575080806020019051810190614cd59190615b2f565b6109de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aff565b6060610a35848460008585600080866001600160a01b03168587604051614d6e9190615b51565b60006040518083038185875af1925050503d8060008114614dab576040519150601f19603f3d011682016040523d82523d6000602084013e614db0565b606091505b5091509150614dc187838387614dcc565b979650505050505050565b60608315614e3b578251600003614e34576001600160a01b0385163b614e345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aff565b5081610a35565b610a358383815115614e505781518083602001fd5b8060405162461bcd60e51b8152600401610aff9190615a62565b604051806040016040528060006001600160801b03168152602001614e8d614f58565b905290565b6040805160808101825260008082526020820152908101614eb1614f58565b8152602001614e8d614f76565b8260028101928215614f1e579160200282015b82811115614f1e57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614ed1565b50614031929150614fda565b8260038101928215614f1e579160200282015b82811115614f1e578251825591602001919060010190614f3d565b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181614f855790505090565b60405180606001604052806003906020820280368337509192915050565b5b808211156140315760008155600101614fdb565b60006020828403121561500157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce257600080fd5b6001600160a01b0381168114610cc357600080fd5b60008083601f84011261505857600080fd5b50813567ffffffffffffffff81111561507057600080fd5b6020830191508360208260061b8501011115614a6357600080fd5b80356001600160801b03811681146150a257600080fd5b919050565b60008060008060008060a087890312156150c057600080fd5b86356150cb81615031565b955060208701356150db81615031565b9450604087013567ffffffffffffffff8111156150f757600080fd5b61510389828a01615046565b9095509350506060870135915061511c6080880161508b565b90509295509295509295565b80610100810183101561075f57600080fd5b6000806000610220848603121561515057600080fd5b833592506151618560208601615128565b9150615171856101208601615128565b90509250925092565b60006020828403121561518c57600080fd5b5035919050565b600080600080606085870312156151a957600080fd5b84356151b481615031565b935060208501356151c481615031565b9250604085013567ffffffffffffffff8111156151e057600080fd5b6151ec87828801615046565b95989497509550505050565b6000806040838503121561520b57600080fd5b82359150602083013561521d81615031565b809150509250929050565b6000806040838503121561523b57600080fd5b823561524681615031565b9150602083013561521d81615031565b803563ffffffff811681146150a257600080fd5b60008060006060848603121561527f57600080fd5b833561528a81615031565b9250602084013561529a81615031565b915061517160408501615256565b6000602082840312156152ba57600080fd5b610ce282615256565b8060005b60028110156121a95781516001600160a01b03168452602093840193909101906001016152c7565b81516001600160801b03168152602080830151606083019161313d908401826152c3565b6000806020838503121561532657600080fd5b823567ffffffffffffffff8082111561533e57600080fd5b818501915085601f83011261535257600080fd5b81358181111561536157600080fd5b86602082850101111561537357600080fd5b60209290920196919550909350505050565b6000806040838503121561539857600080fd5b50508035926020909101359150565b6000806000606084860312156153bc57600080fd5b83356153c781615031565b92506020840135915060408401356153de81615031565b809150509250925092565b8051825260206001600160a01b03818301511681840152604082015161541260408501826152c3565b506060820151608080850160005b6002811015615482576154728285516001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b9284019290820190600101615420565b50505050505050565b610180810161075f82846153e9565b600080600061014084860312156154b057600080fd5b83356154bb81615031565b925060208401356154cb81615031565b91506151718560408601615128565b600080600080608085870312156154f057600080fd5b84356154fb81615031565b9350602085013561550b81615031565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b818110156155635761554f8385516153e9565b92840192610180929092019160010161553c565b50909695505050505050565b60006020828403121561558157600080fd5b8135610ce281615031565b602080825282518282018190526000919060409081850190868401855b828110156155cc576155bc8483516152c3565b92840192908501906001016155a9565b5091979650505050505050565b6000602082840312156155eb57600080fd5b8151610ce281615031565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff81811683821601908082111561313d5761313d61560c565b60006020828403121561564f57600080fd5b610ce28261508b565b6001600160801b0381811683821601908082111561313d5761313d61560c565b61012081016156c582866001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b83516001600160801b03908116608084015260208501511660a0830152604084015167ffffffffffffffff90811660c084015260608501511660e08301525b60ff8316610100830152949350505050565b6001600160801b0382811682821603908082111561313d5761313d61560c565b8082018082111561075f5761075f61560c565b803567ffffffffffffffff811681146150a257600080fd5b60006020828403121561577357600080fd5b610ce282615749565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156157a457600080fd5b6040516080810181811067ffffffffffffffff821117156157d557634e487b7160e01b600052604160045260246000fd5b6040526157e18361508b565b81526157ef6020840161508b565b602082015261580060408401615749565b604082015261581160608401615749565b60608201529392505050565b6001600160801b038061582f8361508b565b1683528061583f6020840161508b565b1660208401525061585260408201615749565b67ffffffffffffffff80821660408501528061587060608501615749565b16606085015250505050565b610120810161588b828661581d565b615704608083018561581d565b83815261012081016158eb60208301856001600160801b0380825116835280602083015116602084015250604081015167ffffffffffffffff808216604085015280606084015116606085015250505050565b82516001600160801b0390811660a084015260208401511660c0830152604083015167ffffffffffffffff90811660e0840152606084015116610100830152610a35565b8181038181111561075f5761075f61560c565b8381526101208101615957602083018561581d565b610a3560a083018461581d565b60006001600160801b038083168181036159805761598061560c565b6001019392505050565b63ffffffff82811682821603908082111561313d5761313d61560c565b634e487b7160e01b600052601260045260246000fd5b60005b838110156159d85781810151838201526020016159c0565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615a198160178501602088016159bd565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615a568160288401602088016159bd565b01602801949350505050565b6020815260008251806020840152615a818160408501602087016159bd565b601f01601f19169190910160400192915050565b808202811582820484141761075f5761075f61560c565b600082615ac957634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215615ae057600080fd5b5051919050565b600081615af657615af661560c565b506000190190565b634e487b7160e01b600052603160045260246000fd5b61ffff82811682821603908082111561313d5761313d61560c565b600060208284031215615b4157600080fd5b81518015158114610ce257600080fd5b60008251615b638184602087016159bd565b919091019291505056fea164736f6c6343000813000a", - "devdoc": { - "details": "Carbon Controller contract", - "events": { - "FeesWithdrawn(address,address,uint256,address)": { - "details": "triggered when fees are withdrawn" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "PairCreated(uint128,address,address)": { - "details": "triggered when a new pair is created" - }, - "PairTradingFeePPMUpdated(address,address,uint32,uint32)": { - "details": "triggered when the custom trading fee for a given pair is updated" - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "StrategyCreated(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is created" - }, - "StrategyDeleted(uint256,address,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64))": { - "details": "triggered when a strategy is deleted" - }, - "StrategyUpdated(uint256,address,address,(uint128,uint128,uint64,uint64),(uint128,uint128,uint64,uint64),uint8)": { - "details": "triggered when a strategy is updated" - }, - "TokensTraded(address,address,address,uint256,uint256,uint128,bool)": { - "details": "triggered when tokens are traded" - }, - "TradingFeePPMUpdated(uint32,uint32)": { - "details": "triggered when the network fee is updated" - } - }, - "kind": "dev", - "methods": { - "accumulatedFees(address)": { - "details": "returns the amount of fees accumulated for the specified token" - }, - "calculateTradeSourceAmount(address,address,(uint256,uint128)[])": { - "details": "returns the source amount required when trading by target amount" - }, - "calculateTradeTargetAmount(address,address,(uint256,uint128)[])": { - "details": "returns the target amount expected when trading by source amount" - }, - "constructor": { - "details": "used to set immutable state variables and initialize the implementation" - }, - "controllerType()": { - "details": "returns the type of the controller" - }, - "createPair(address,address)": { - "details": "creates a new pair of provided token0 and token1" - }, - "createStrategy(address,address,(uint128,uint128,uint64,uint64)[2])": { - "details": "creates a new strategy, returns the strategy's id requirements: - the caller must have approved the tokens with assigned liquidity in the order, if any" - }, - "deleteStrategy(uint256)": { - "details": "deletes a strategy matching the provided id notes: - 100% of liquidity is withdrawn and sent to the owner requirements: - the caller must be the owner of the NFT voucher" - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize()": { - "details": "fully initializes the contract and its parents" - }, - "pair(address,address)": { - "details": "returns a pair's metadata matching the provided token0 and token1" - }, - "pairTradingFeePPM(address,address)": { - "details": "returns the trading fee for a given pair (in units of PPM)" - }, - "pairs()": { - "details": "returns a list of all supported pairs" - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "roleFeesManager()": { - "details": "returns the fees manager role" - }, - "setPairTradingFeePPM(address,address,uint32)": { - "details": "sets the custom trading fee for a given pair (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "setTradingFeePPM(uint32)": { - "details": "sets the trading fee (in units of PPM) requirements: - the caller must be the admin of the contract" - }, - "strategiesByPair(address,address,uint256,uint256)": { - "details": "returns strategies belonging to a specific pair note that for the full list of strategies pass 0 to both startIndex and endIndex" - }, - "strategiesByPairCount(address,address)": { - "details": "returns the count of strategies belonging to a specific pair" - }, - "strategy(uint256)": { - "details": "returns a strategy matching the provided id, note tokens and orders are returned sorted as provided upon creation" - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "tradeBySourceAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed source amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradeByTargetAmount(address,address,(uint256,uint128)[],uint256,uint128)": { - "details": "performs a trade by specifying a fixed target amount notes: - excess native token is returned to the sender if any requirements: - the caller must have approved the source token" - }, - "tradingFeePPM()": { - "details": "returns the trading fee (in units of PPM)" - }, - "updateStrategy(uint256,(uint128,uint128,uint64,uint64)[2],(uint128,uint128,uint64,uint64)[2])": { - "details": "updates an existing strategy notes: - currentOrders should reflect the orders values at the time of sending the tx this prevents cases in which the strategy was updated due to a trade between the time the transaction was sent and the time it was mined, thus, giving more control to the strategy owner. - reduced liquidity is refunded to the owner - increased liquidity is deposited - excess native token is returned to the sender if any - the sorting of orders is expected to equal the sorting upon creation requirements: - the caller must have approved the tokens with increased liquidity, if any" - }, - "withdrawFees(address,uint256,address)": { - "details": "transfers the accumulated fees to the specified recipient notes: `amount` is capped to the available amount returns the amount withdrawn" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 13175, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_lastPairId", - "offset": 0, - "slot": "51", - "type": "t_uint128" - }, - { - "astId": 13183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairIds", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_userDefinedValueType(Token)19697,t_mapping(t_userDefinedValueType(Token)19697,t_uint128))" - }, - { - "astId": 13190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_pairsStorage", - "offset": 0, - "slot": "53", - "type": "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19697)2_storage)" - }, - { - "astId": 13196, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "54", - "type": "t_array(t_uint256)47_storage" - }, - { - "astId": 13666, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyCounter", - "offset": 0, - "slot": "101", - "type": "t_uint128" - }, - { - "astId": 13668, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_tradingFeePPM", - "offset": 16, - "slot": "101", - "type": "t_uint32" - }, - { - "astId": 13674, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_packedOrdersByStrategyId", - "offset": 0, - "slot": "102", - "type": "t_mapping(t_uint256,t_array(t_uint256)3_storage)" - }, - { - "astId": 13679, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_strategyIdsByPairIdStorage", - "offset": 0, - "slot": "103", - "type": "t_mapping(t_uint128,t_struct(UintSet)4058_storage)" - }, - { - "astId": 13684, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_accumulatedFees", - "offset": 0, - "slot": "104", - "type": "t_mapping(t_userDefinedValueType(Token)19697,t_uint256)" - }, - { - "astId": 13688, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_customTradingFeePPM", - "offset": 0, - "slot": "105", - "type": "t_mapping(t_uint128,t_uint32)" - }, - { - "astId": 13694, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "106", - "type": "t_array(t_uint256)45_storage" - }, - { - "astId": 2591, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "151", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roles", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_roleMembers", - "offset": 0, - "slot": "251", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21185, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_initializations", - "offset": 0, - "slot": "301", - "type": "t_uint16" - }, - { - "astId": 21191, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "302", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 764, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_status", - "offset": 0, - "slot": "351", - "type": "t_uint256" - }, - { - "astId": 833, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "352", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12179, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_deprecated", - "offset": 0, - "slot": "401", - "type": "t_bool" - }, - { - "astId": 12183, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__deprecated", - "offset": 0, - "slot": "402", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 12190, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "__gap", - "offset": 0, - "slot": "451", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)3_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[3]", - "numberOfBytes": "96" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)47_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[47]", - "numberOfBytes": "1504" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_array(t_userDefinedValueType(Token)19697)2_storage": { - "base": "t_userDefinedValueType(Token)19697", - "encoding": "inplace", - "label": "Token[2]", - "numberOfBytes": "64" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint128,t_array(t_userDefinedValueType(Token)19697)2_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => Token[2])", - "numberOfBytes": "32", - "value": "t_array(t_userDefinedValueType(Token)19697)2_storage" - }, - "t_mapping(t_uint128,t_struct(UintSet)4058_storage)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => struct EnumerableSetUpgradeable.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)4058_storage" - }, - "t_mapping(t_uint128,t_uint32)": { - "encoding": "mapping", - "key": "t_uint128", - "label": "mapping(uint128 => uint32)", - "numberOfBytes": "32", - "value": "t_uint32" - }, - "t_mapping(t_uint256,t_array(t_uint256)3_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256[3])", - "numberOfBytes": "32", - "value": "t_array(t_uint256)3_storage" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_mapping(t_userDefinedValueType(Token)19697,t_uint128))": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => mapping(Token => uint128))", - "numberOfBytes": "32", - "value": "t_mapping(t_userDefinedValueType(Token)19697,t_uint128)" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_uint128)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => uint128)", - "numberOfBytes": "32", - "value": "t_uint128" - }, - "t_mapping(t_userDefinedValueType(Token)19697,t_uint256)": { - "encoding": "mapping", - "key": "t_userDefinedValueType(Token)19697", - "label": "mapping(Token => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)4058_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.UintSet", - "members": [ - { - "astId": 4057, - "contract": "contracts/carbon/CarbonController.sol:CarbonController", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint128": { - "encoding": "inplace", - "label": "uint128", - "numberOfBytes": "16" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - }, - "t_userDefinedValueType(Token)19697": { - "encoding": "inplace", - "label": "Token", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/sei/CarbonController_Proxy.json b/src/contracts/sei/CarbonController_Proxy.json deleted file mode 100644 index ff5d667..0000000 --- a/src/contracts/sei/CarbonController_Proxy.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "transactionIndex": 0, - "gasUsed": "857050", - "logsBloom": "0x000040048200000008020000000000004800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000020000000001000000000000000000000000000000000200004000000000001008000000008000000000200000000000000000000140000000000000000000000000000000000000a0000000000001800000000000000400000000000000000400000040000000000000001000000000000000000020000002000000000000040000000000000400000100000000000020000000200000000000000000000000000000000000000000000000100000000000", - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279", - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000008ce318919438982514f9f479fdfb40d32c6ab749" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x66db0986e1156e2e747795714bf0301c7e1c695c149a738cb01bcf5cfead8465" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d0", - "logIndex": 1, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x24a843cae781765d8cdc3bca1cc42497522c0508f4e621c2ca36ceea2fda7b16", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 5, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - }, - { - "transactionIndex": 35, - "blockNumber": 79146720, - "transactionHash": "0x4762dba817c0793a44b53995c175f64caedd1a6915a063726c650a0d1b2abba5", - "address": "0xe4816658ad10bF215053C533cceAe3f59e1f1087", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 6, - "blockHash": "0x0d6f6400804c6f8cd98fe8d8f1f62115ee2619aac4ed2c4b7b51e67845757279" - } - ], - "blockNumber": 79146720, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0x8cE318919438982514F9f479FDfB40D32C6ab749", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x8129fc1c" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/sei/ProxyAdmin.json b/src/contracts/sei/ProxyAdmin.json deleted file mode 100644 index 76b1d9f..0000000 --- a/src/contracts/sei/ProxyAdmin.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "address": "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "transactionIndex": 0, - "gasUsed": "483751", - "logsBloom": "0x00000000820000000000000000000000000000000000000000800000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000400000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000002000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x34f4736f3a37e3523733b0afb93e546c48be2a6ddc5d1754ce1dc102d3d9da71", - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146427, - "transactionHash": "0x22646d706b57bf4cd8e1e68a1982e6fbcf1dcc610fe6bba100d45b6a7ecc93d4", - "address": "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x34f4736f3a37e3523733b0afb93e546c48be2a6ddc5d1754ce1dc102d3d9da71" - } - ], - "blockNumber": 79146427, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITransparentUpgradeableProxy\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.8.3._\\n */\\ninterface IERC1967 {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@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/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/IERC1967.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 */\\nabstract contract ERC1967Upgrade is IERC1967 {\\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 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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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 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 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(address newBeacon, bytes memory data, bool forceCall) 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\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"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/transparent/ProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./TransparentUpgradeableProxy.sol\\\";\\nimport \\\"../../access/Ownable.sol\\\";\\n\\n/**\\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\\n */\\ncontract ProxyAdmin is Ownable {\\n /**\\n * @dev Returns the current implementation of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"5c60da1b\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the current admin of `proxy`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\\\"f851a440\\\");\\n require(success);\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `proxy` to `newAdmin`.\\n *\\n * Requirements:\\n *\\n * - This contract must be the current admin of `proxy`.\\n */\\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\\n proxy.changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\\n proxy.upgradeTo(implementation);\\n }\\n\\n /**\\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\\n *\\n * Requirements:\\n *\\n * - This contract must be the admin of `proxy`.\\n */\\n function upgradeAndCall(\\n ITransparentUpgradeableProxy proxy,\\n address implementation,\\n bytes memory data\\n ) public payable virtual onlyOwner {\\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\\n }\\n}\\n\",\"keccak256\":\"0x8e99882a991853dc446278576c8cb9b3a5ded84642e9bcc917b1677807c2f18c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\n * include them in the ABI so this interface must be used to interact with it.\\n */\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\n function admin() external view returns (address);\\n\\n function implementation() external view returns (address);\\n\\n function changeAdmin(address) external;\\n\\n function upgradeTo(address) external;\\n\\n function upgradeToAndCall(address, bytes memory) external payable;\\n}\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n *\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\n * implementation.\\n *\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n *\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\n * implementation provides a function with the same selector.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\n */\\n function _fallback() internal virtual override {\\n if (msg.sender == _getAdmin()) {\\n bytes memory ret;\\n bytes4 selector = msg.sig;\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\n ret = _dispatchUpgradeTo();\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\n ret = _dispatchUpgradeToAndCall();\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\n ret = _dispatchChangeAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\n ret = _dispatchAdmin();\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\n ret = _dispatchImplementation();\\n } else {\\n revert(\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n }\\n assembly {\\n return(add(ret, 0x20), mload(ret))\\n }\\n } else {\\n super._fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function _dispatchAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address admin = _getAdmin();\\n return abi.encode(admin);\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function _dispatchImplementation() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address implementation = _implementation();\\n return abi.encode(implementation);\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newAdmin = abi.decode(msg.data[4:], (address));\\n _changeAdmin(newAdmin);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n */\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\n _requireZeroValue();\\n\\n address newImplementation = abi.decode(msg.data[4:], (address));\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n */\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\n _upgradeToAndCall(newImplementation, data, true);\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\n */\\n function _requireZeroValue() private {\\n require(msg.value == 0);\\n }\\n}\\n\",\"keccak256\":\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107648061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610579565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d161022e565b005b3480156100df57600080fd5b506100d16100ee36600461059d565b610242565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610605565b6102c3565b34801561013057600080fd5b506100d161013f36600461059d565b61034b565b34801561015057600080fd5b506100d161015f366004610579565b61039a565b34801561017057600080fd5b506100a061017f366004610579565b610449565b6000806000836001600160a01b03166040516101c3907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b50915091508161021257600080fd5b8080602001905181019061022691906106db565b949350505050565b610236610488565b61024060006104fc565b565b61024a610488565b6040517f8f2839700000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102a757600080fd5b505af11580156102bb573d6000803e3d6000fd5b505050505050565b6102cb610488565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081526001600160a01b03841690634f1ef28690349061031490869086906004016106f8565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b5050505050505050565b610353610488565b6040517f3659cfe60000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152831690633659cfe69060240161028d565b6103a2610488565b6001600160a01b03811661043d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610446816104fc565b50565b6000806000836001600160a01b03166040516101c3907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000546001600160a01b03163314610240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610434565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461044657600080fd5b60006020828403121561058b57600080fd5b813561059681610564565b9392505050565b600080604083850312156105b057600080fd5b82356105bb81610564565b915060208301356105cb81610564565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561061a57600080fd5b833561062581610564565b9250602084013561063581610564565b9150604084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b813581811115610678576106786105d6565b604051601f8201601f19908116603f011681019083821181831017156106a0576106a06105d6565b816040528281528960208487010111156106b957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156106ed57600080fd5b815161059681610564565b6001600160a01b038316815260006020604081840152835180604085015260005b8181101561073557858101830151858201606001528201610719565b506000606082860101526060601f19601f83011685010192505050939250505056fea164736f6c6343000813000a", - "devdoc": { - "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", - "kind": "dev", - "methods": { - "changeProxyAdmin(address,address)": { - "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." - }, - "getProxyAdmin(address)": { - "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "getProxyImplementation(address)": { - "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." - }, - "owner()": { - "details": "Returns the address of the current owner." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "upgrade(address,address)": { - "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." - }, - "upgradeAndCall(address,address,bytes)": { - "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 4735, - "contract": "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/sei/Voucher.json b/src/contracts/sei/Voucher.json deleted file mode 100644 index a336efc..0000000 --- a/src/contracts/sei/Voucher.json +++ /dev/null @@ -1,1102 +0,0 @@ -{ - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ], - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "transactionIndex": 0, - "gasUsed": "971164", - "logsBloom": "0x000000048208000008000000000000004800000000000000000000000000000000000000000000000000000000008000000000000040000000000000000000000000000000000000000008204000020000000000000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000000000080000400000000000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc", - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 4, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - } - ], - "blockNumber": 79146505, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "execute": { - "methodName": "initialize", - "args": [ - true, - "ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn", - "" - ] - }, - "implementation": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/src/contracts/sei/Voucher_Implementation.json b/src/contracts/sei/Voucher_Implementation.json deleted file mode 100644 index c5d045b..0000000 --- a/src/contracts/sei/Voucher_Implementation.json +++ /dev/null @@ -1,1456 +0,0 @@ -{ - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "ControllerAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidIndices", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyController", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "BaseExtensionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "BaseURIUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "UseGlobalURIUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "controller", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - }, - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - }, - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "postUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseExtension", - "type": "string" - } - ], - "name": "setBaseExtension", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newBaseURI", - "type": "string" - } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "controllerAddress", - "type": "address" - } - ], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endIndex", - "type": "uint256" - } - ], - "name": "tokensByOwner", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "newUseGlobalURI", - "type": "bool" - } - ], - "name": "useGlobalURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "transactionIndex": 0, - "gasUsed": "3136060", - "logsBloom": "0x000000048200000008000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204000000000000000000000000000000000000000000001000200004000000000000008000000000000000000000000000000000000000100000000000000000000000000000000000000a0000000000000000000000000000000000000000000000400000000000000000000001000000000000000000000000000000000000000040000000000000000000100000000000020000000000000000080000000000000000000200000000000000000000000000000", - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12", - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "logs": [ - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - }, - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - }, - { - "transactionIndex": 36, - "blockNumber": 79146440, - "transactionHash": "0xc5469d60228f5fadaeedee77a56e6a99797bed0a9a23a0ac39ddf5b1954a020c", - "address": "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 2, - "blockHash": "0x03b3b12e58a7e48d40bb6d228745c83525c229069d534d80ab87dc12426aab12" - } - ], - "blockNumber": 79146440, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "929c5fcaa0506f3efee89f4e029bac6f", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessDenied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ControllerAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidIndices\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyController\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"BaseExtensionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"BaseURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"UseGlobalURIUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"postUpgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseExtension\",\"type\":\"string\"}],\"name\":\"setBaseExtension\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"controllerAddress\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endIndex\",\"type\":\"uint256\"}],\"name\":\"tokensByOwner\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"newUseGlobalURI\",\"type\":\"bool\"}],\"name\":\"useGlobalURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseExtensionUpdated(string)\":{\"details\":\"triggered when updating the baseExtension\"},\"BaseURIUpdated(string)\":{\"details\":\"triggered when updating the baseURI\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"UseGlobalURIUpdated(bool)\":{\"details\":\"triggered when updating useGlobalURI\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"destroys the voucher token for the given strategyId requirements: - the caller must be the controller address\"},\"constructor\":{\"details\":\"used to initialize the implementation\"},\"controller()\":{\"details\":\"returns the controller address\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(bool,string,string)\":{\"details\":\"fully initializes the contract and its parents\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"mint(address,uint256)\":{\"details\":\"creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"postUpgrade(bytes)\":{\"details\":\"performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"roleAdmin()\":{\"details\":\"returns the admin role\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setBaseExtension(string)\":{\"details\":\"sets the base extension requirements: - the caller must be the admin of this contract\"},\"setBaseURI(string)\":{\"details\":\"sets the base URI requirements: - the caller must be the admin of this contract\"},\"setController(address)\":{\"details\":\"sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens\"},\"tokensByOwner(address,uint256,uint256)\":{\"details\":\"returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"useGlobalURI(bool)\":{\"details\":\"sets the useGlobalURI flag requirements: - the caller must be the admin of this contract\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/voucher/Voucher.sol\":\"Voucher\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x121966b3220d263a6669dcf59c1254bd48ed237adf4d8a595add70a7927eada1\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"./extensions/IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\\n using AddressUpgradeable for address;\\n using StringsUpgradeable 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 function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\\n return\\n interfaceId == type(IERC721Upgradeable).interfaceId ||\\n interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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(address from, address to, uint256 tokenId) 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(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) 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(address from, address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.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(address to, uint256 tokenId, bytes memory data) 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 = ERC721Upgradeable.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721Upgradeable.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(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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(address owner, address operator, bool approved) 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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721ReceiverUpgradeable.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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\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(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0x09fa60c34ff9b067e5ad3af7719d490a12e0ca39132df6f870746eb0d32308ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.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 IERC721ReceiverUpgradeable {\\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\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.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 \\\"../IERC721Upgradeable.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 IERC721MetadataUpgradeable is IERC721Upgradeable {\\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\",\"keccak256\":\"0x95a471796eb5f030fdc438660bebec121ad5d063763e64d92376ffb4b5ce8b70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary 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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, 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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/utility/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nuint32 constant PPM_RESOLUTION = 1_000_000;\\n\\nuint32 constant MAX_GAP = 50;\\n\",\"keccak256\":\"0x6cbf2c0e48b5377fe5fea47278256856368612efd7e29b17c716f1611b64d0f3\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"./interfaces/IUpgradeable.sol\\\";\\n\\nimport { AccessDenied } from \\\"./Utils.sol\\\";\\n\\nimport { MAX_GAP } from \\\"./Constants.sol\\\";\\n\\n/**\\n * @dev this contract provides common utilities for upgradeable contracts\\n *\\n * note that we're using the Transparent Upgradeable Proxy pattern and *not* the Universal Upgradeable Proxy Standard\\n * (UUPS) pattern, therefore initializing the implementation contracts is not necessary or required\\n */\\nabstract contract Upgradeable is IUpgradeable, AccessControlEnumerableUpgradeable {\\n error AlreadyInitialized();\\n\\n // the admin role is used to allow a non-proxy admin to perform additional initialization/setup during contract\\n // upgrades\\n bytes32 internal constant ROLE_ADMIN = keccak256(\\\"ROLE_ADMIN\\\");\\n\\n uint16 internal _initializations;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 1] private __gap;\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Upgradeable_init() internal onlyInitializing {\\n __AccessControl_init();\\n\\n __Upgradeable_init_unchained();\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Upgradeable_init_unchained() internal onlyInitializing {\\n _initializations = version() - 1;\\n\\n // set up administrative roles\\n _setRoleAdmin(ROLE_ADMIN, ROLE_ADMIN);\\n\\n // allow the deployer to initially be the admin of the contract\\n _setupRole(ROLE_ADMIN, msg.sender);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n modifier onlyAdmin() {\\n _hasRole(ROLE_ADMIN, msg.sender);\\n\\n _;\\n }\\n\\n modifier onlyRoleMember(bytes32 role) {\\n _hasRole(role, msg.sender);\\n\\n _;\\n }\\n\\n function version() public view virtual override returns (uint16);\\n\\n /**\\n * @dev returns the admin role\\n */\\n function roleAdmin() external pure returns (bytes32) {\\n return ROLE_ADMIN;\\n }\\n\\n /**\\n * @dev performs post-upgrade initialization\\n *\\n * requirements:\\n *\\n * - this must and can be called only once per-upgrade\\n */\\n function postUpgrade(bytes calldata data) external {\\n uint16 initializations = _initializations + 1;\\n if (initializations != version()) {\\n revert AlreadyInitialized();\\n }\\n\\n _initializations = initializations;\\n\\n _postUpgrade(data);\\n }\\n\\n /**\\n * @dev an optional post-upgrade callback that can be implemented by child contracts\\n */\\n function _postUpgrade(bytes calldata /* data */) internal virtual {}\\n\\n function _hasRole(bytes32 role, address account) internal view {\\n if (!hasRole(role, account)) {\\n revert AccessDenied();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x46798d13fe3436ae6364dd6f37ca254248bb6b4bda3c9adfa118850396a2f5d9\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { PPM_RESOLUTION } from \\\"./Constants.sol\\\";\\n\\nerror AccessDenied();\\nerror InvalidAddress();\\nerror InvalidFee();\\nerror ZeroValue();\\nerror InvalidIndices();\\n\\n/**\\n * @dev common utilities\\n */\\nabstract contract Utils {\\n using Address for address payable;\\n\\n // verifies that a value is greater than zero\\n modifier greaterThanZero(uint256 value) {\\n _greaterThanZero(value);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _greaterThanZero(uint256 value) internal pure {\\n if (value == 0) {\\n revert ZeroValue();\\n }\\n }\\n\\n // validates an address - currently only checks that it isn't null\\n modifier validAddress(address addr) {\\n _validAddress(addr);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validAddress(address addr) internal pure {\\n if (addr == address(0)) {\\n revert InvalidAddress();\\n }\\n }\\n\\n // ensures that the fee is valid\\n modifier validFee(uint32 fee) {\\n _validFee(fee);\\n\\n _;\\n }\\n\\n // error message binary size optimization\\n function _validFee(uint32 fee) internal pure {\\n if (fee > PPM_RESOLUTION) {\\n revert InvalidFee();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf6f3ad1ec3ee378729ebe1ffc0ac72e95a6353a9ec5b85fdf3e4c3b0f54a5f1e\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IVersioned } from \\\"./IVersioned.sol\\\";\\n\\nimport { IAccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\\\";\\n\\n/**\\n * @dev this is the common interface for upgradeable contracts\\n */\\ninterface IUpgradeable is IAccessControlEnumerableUpgradeable, IVersioned {\\n\\n}\\n\",\"keccak256\":\"0xcc42138a568e5b5e6e1b96402d351ea04627e03bf24c0b62439910d3fda2773c\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/utility/interfaces/IVersioned.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev an interface for a versioned contract\\n */\\ninterface IVersioned {\\n function version() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xa5068bacf412d0eac67377cfed9cc2bd6b36099cc4bba9f360a38d05a7bf4a04\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/Voucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity 0.8.19;\\n\\nimport { AccessControlEnumerableUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport { IERC165Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol\\\";\\nimport { ERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { Strings } from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n\\nimport { IVersioned } from \\\"../utility/interfaces/IVersioned.sol\\\";\\nimport { Upgradeable } from \\\"../utility/Upgradeable.sol\\\";\\nimport { Utils, InvalidIndices } from \\\"../utility/Utils.sol\\\";\\nimport { MAX_GAP } from \\\"../utility/Constants.sol\\\";\\n\\nimport { IVoucher } from \\\"./interfaces/IVoucher.sol\\\";\\n\\ncontract Voucher is IVoucher, Upgradeable, ERC721Upgradeable, Utils {\\n using Strings for uint256;\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n error BatchNotSupported();\\n\\n // a flag used to toggle between a unique URI per token / one global URI for all tokens\\n bool private _useGlobalURI;\\n\\n // the prefix of a dynamic URI representing a single token\\n string private __baseURI;\\n\\n // the suffix of a dynamic URI for e.g. `.json`\\n string private _baseExtension;\\n\\n // a mapping between an owner to its tokenIds\\n mapping(address => EnumerableSet.UintSet) internal _ownedTokens;\\n\\n // controller address - used to mint / burn\\n address private _controller;\\n\\n // upgrade forward-compatibility storage gap\\n uint256[MAX_GAP - 5] private __gap;\\n\\n /**\\n @dev triggered when updating useGlobalURI\\n */\\n event UseGlobalURIUpdated(bool newUseGlobalURI);\\n\\n /**\\n * @dev triggered when updating the baseURI\\n */\\n event BaseURIUpdated(string newBaseURI);\\n\\n /**\\n * @dev triggered when updating the baseExtension\\n */\\n event BaseExtensionUpdated(string newBaseExtension);\\n\\n /**\\n * @dev used to initialize the implementation\\n */\\n constructor() {\\n initialize(true, \\\"ipfs://QmUyDUzQtwAhMB1hrYaQAqmRTbgt9sUnwq11GeqyzzSuqn\\\", \\\"\\\");\\n }\\n\\n /**\\n * @dev fully initializes the contract and its parents\\n */\\n function initialize(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) public initializer {\\n __Voucher_init(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n // solhint-disable func-name-mixedcase\\n\\n /**\\n * @dev initializes the contract and its parents\\n */\\n function __Voucher_init(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n __Upgradeable_init();\\n __ERC721_init(\\\"Carbon Automated Trading Strategy\\\", \\\"CARBON-STRAT\\\");\\n\\n __Voucher_init_unchained(newUseGlobalURI, newBaseURI, newBaseExtension);\\n }\\n\\n /**\\n * @dev performs contract-specific initialization\\n */\\n function __Voucher_init_unchained(\\n bool newUseGlobalURI,\\n string memory newBaseURI,\\n string memory newBaseExtension\\n ) internal onlyInitializing {\\n _useGlobalURI = newUseGlobalURI;\\n __baseURI = newBaseURI;\\n _baseExtension = newBaseExtension;\\n }\\n\\n /**\\n * @inheritdoc IERC165Upgradeable\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, IERC165Upgradeable) returns (bool) {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n // solhint-enable func-name-mixedcase\\n\\n /**\\n * @inheritdoc Upgradeable\\n */\\n function version() public pure override(IVersioned, Upgradeable) returns (uint16) {\\n return 2;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function controller() external view returns (address) {\\n return _controller;\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function mint(address owner, uint256 tokenId) external onlyController {\\n _safeMint(owner, tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function burn(uint256 tokenId) external onlyController {\\n _burn(tokenId);\\n }\\n\\n /**\\n * @inheritdoc IVoucher\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view validAddress(owner) returns (uint256[] memory) {\\n EnumerableSet.UintSet storage tokenIds = _ownedTokens[owner];\\n uint256 allLength = tokenIds.length();\\n\\n // when the endIndex is 0 or out of bound, set the endIndex to the last valid value\\n if (endIndex == 0 || endIndex > allLength) {\\n endIndex = allLength;\\n }\\n\\n // revert when startIndex is out of bound\\n if (startIndex > endIndex) {\\n revert InvalidIndices();\\n }\\n\\n // populate the result\\n uint256 resultLength = endIndex - startIndex;\\n uint256[] memory result = new uint256[](resultLength);\\n for (uint256 i = 0; i < resultLength; i++) {\\n result[i] = tokenIds.at(startIndex + i);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher,\\n * or a URI of a global json used for all tokens\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n string memory baseURI = _baseURI();\\n if (_useGlobalURI) {\\n return baseURI;\\n }\\n\\n if (bytes(baseURI).length > 0) {\\n return string(abi.encodePacked(baseURI, tokenId.toString(), _baseExtension));\\n }\\n\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev sets the base URI\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseURI(string memory newBaseURI) public onlyAdmin {\\n __baseURI = newBaseURI;\\n\\n emit BaseURIUpdated(newBaseURI);\\n }\\n\\n /**\\n * @dev sets the base extension\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function setBaseExtension(string memory newBaseExtension) public onlyAdmin {\\n _baseExtension = newBaseExtension;\\n\\n emit BaseExtensionUpdated(newBaseExtension);\\n }\\n\\n /**\\n * @dev sets the useGlobalURI flag\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n */\\n function useGlobalURI(bool newUseGlobalURI) public onlyAdmin {\\n if (_useGlobalURI == newUseGlobalURI) {\\n return;\\n }\\n\\n _useGlobalURI = newUseGlobalURI;\\n emit UseGlobalURIUpdated(newUseGlobalURI);\\n }\\n\\n /**\\n * @dev sets the controller address\\n *\\n * requirements:\\n *\\n * - the caller must be the admin of this contract\\n * - controller address must not be set\\n */\\n function setController(address controllerAddress) external onlyAdmin {\\n if (_controller != address(0)) {\\n revert ControllerAlreadySet();\\n }\\n _controller = controllerAddress;\\n }\\n\\n modifier onlyController() {\\n _onlyController();\\n _;\\n }\\n\\n function _onlyController() private view {\\n if (msg.sender != _controller) {\\n revert OnlyController();\\n }\\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`, `tokenId`\\n */\\n function _baseURI() internal view virtual override returns (string memory) {\\n return __baseURI;\\n }\\n\\n /**\\n * @dev See {ERC721-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 firstTokenId,\\n uint256 batchSize\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\\n\\n if (batchSize > 1) {\\n revert BatchNotSupported();\\n }\\n\\n if (from == address(0)) {\\n _ownedTokens[to].add(firstTokenId);\\n } else if (from != to) {\\n _ownedTokens[from].remove(firstTokenId);\\n }\\n if (to == address(0)) {\\n _ownedTokens[from].remove(firstTokenId);\\n } else if (to != from) {\\n _ownedTokens[to].add(firstTokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc79748684fcebab62bedf5de477bf25fb41f7462a17e76cbef449222182c5f54\",\"license\":\"SEE LICENSE IN LICENSE\"},\"contracts/voucher/interfaces/IVoucher.sol\":{\"content\":\"// SPDX-License-Identifier: SEE LICENSE IN LICENSE\\npragma solidity ^0.8.0;\\n\\nimport { IERC721Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\n\\nimport { IUpgradeable } from \\\"../../utility/interfaces/IUpgradeable.sol\\\";\\n\\n/**\\n * @dev Voucher interface\\n */\\ninterface IVoucher is IUpgradeable, IERC721Upgradeable {\\n error ControllerAlreadySet();\\n error OnlyController();\\n\\n /**\\n * @dev returns the controller address\\n */\\n function controller() external view returns (address);\\n \\n /**\\n * @dev creates a new voucher token for the given strategyId, transfers it to the owner\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function mint(address owner, uint256 strategyId) external;\\n\\n /**\\n * @dev destroys the voucher token for the given strategyId\\n *\\n * requirements:\\n *\\n * - the caller must be the controller address\\n *\\n */\\n function burn(uint256 strategyId) external;\\n\\n /**\\n * @dev returns a list of tokenIds belonging to the given owner\\n * note that for the full list of tokenIds pass 0 to both startIndex and endIndex\\n */\\n function tokensByOwner(\\n address owner,\\n uint256 startIndex,\\n uint256 endIndex\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xf849364f45555e654783d6df21ccefcded4175262889a316dc3e16bdf8f51f17\",\"license\":\"SEE LICENSE IN LICENSE\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5062000047600160405180606001604052806035815260200162003994603591396040805160208101909152600081526200004d565b62000851565b600054610100900460ff16158080156200006e5750600054600160ff909116105b806200008a5750303b1580156200008a575060005460ff166001145b620000f35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000117576000805461ff0019166101001790555b6200012484848462000171565b80156200016b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600054610100900460ff16620001cd5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b620001d762000230565b6200021e604051806060016040528060218152602001620039736021913960408051808201909152600c81526b10d0549093d38b54d514905560a21b6020820152620002a2565b6200022b8383836200030e565b505050565b600054610100900460ff166200028c5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200029662000398565b620002a0620003f4565b565b600054610100900460ff16620002fe5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200030a8282620004aa565b5050565b600054610100900460ff166200036a5760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b61012d805460ff191684151517905561012e62000388838262000754565b5061012f6200016b828262000754565b600054610100900460ff16620002a05760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b600054610100900460ff16620004505760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b6200045e6001600262000820565b60c9805461ffff191661ffff929092169190911790556200048f600080516020620039c98339815191528062000523565b620002a0600080516020620039c9833981519152336200056e565b600054610100900460ff16620005065760405162461bcd60e51b815260206004820152602b6024820152600080516020620039e983398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620000ea565b60fb62000514838262000754565b5060fc6200022b828262000754565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200030a82826200058082826200059a565b60008281526097602052604090206200022b90826200063e565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166200030a5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005fa3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000655836001600160a01b0384166200065e565b90505b92915050565b6000818152600183016020526040812054620006a75750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000658565b50600062000658565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620006db57607f821691505b602082108103620006fc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022b57600081815260208120601f850160051c810160208610156200072b5750805b601f850160051c820191505b818110156200074c5782815560010162000737565b505050505050565b81516001600160401b03811115620007705762000770620006b0565b6200078881620007818454620006c6565b8462000702565b602080601f831160018114620007c05760008415620007a75750858301515b600019600386901b1c1916600185901b1785556200074c565b600085815260208120601f198616915b82811015620007f157888601518255948401946001909101908401620007d0565b5085821015620008105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff8281168282160390808211156200084a57634e487b7160e01b600052601160045260246000fd5b5092915050565b61311280620008616000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a436172626f6e204175746f6d617465642054726164696e67205374726174656779697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80636352211e1161012a578063a217fddf116100bd578063ca15c8731161008c578063da3ef23f11610071578063da3ef23f146104c5578063e985e9c5146104d8578063f77c47911461051557600080fd5b8063ca15c8731461049f578063d547741f146104b257600080fd5b8063a217fddf1461045e578063a22cb46514610466578063b88d4fde14610479578063c87b56dd1461048c57600080fd5b806391d14854116100f957806391d14854146103e457806392eefe9b1461041d57806393867fb51461043057806395d89b411461045657600080fd5b80636352211e1461039857806370a08231146103ab5780638cd2403d146103be5780639010d07c146103d157600080fd5b806336568abe116101a257806343198ac41161017157806343198ac41461034357806349ade0961461036357806354fd4d501461037657806355f804b31461038557600080fd5b806336568abe146102f757806340c10f191461030a57806342842e0e1461031d57806342966c681461033057600080fd5b806323b872dd116101de57806323b872dd1461028d578063248a9ca3146102a05780632c8e0415146102d15780632f2ff15d146102e457600080fd5b806301ffc9a71461021057806306fdde0314610238578063081812fc1461024d578063095ea7b314610278575b600080fd5b61022361021e36600461287f565b610527565b60405190151581526020015b60405180910390f35b610240610538565b60405161022f91906128ec565b61026061025b3660046128ff565b6105ca565b6040516001600160a01b03909116815260200161022f565b61028b610286366004612934565b6105f1565b005b61028b61029b36600461295e565b610727565b6102c36102ae3660046128ff565b60009081526065602052604090206001015490565b60405190815260200161022f565b61028b6102df366004612a56565b6107ae565b61028b6102f2366004612aca565b6108d4565b61028b610305366004612aca565b6108f9565b61028b610318366004612934565b610985565b61028b61032b36600461295e565b610997565b61028b61033e3660046128ff565b6109b2565b610356610351366004612af6565b6109c6565b60405161022f9190612b29565b61028b610371366004612b6d565b610af6565b6040516002815260200161022f565b61028b610393366004612b88565b610b7a565b6102606103a63660046128ff565b610be1565b6102c36103b9366004612bbd565b610c46565b61028b6103cc366004612bd8565b610ce0565b6102606103df366004612c4a565b610d4b565b6102236103f2366004612aca565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61028b61042b366004612bbd565b610d6a565b7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250966102c3565b610240610e08565b6102c3600081565b61028b610474366004612c6c565b610e17565b61028b610487366004612c96565b610e22565b61024061049a3660046128ff565b610eaa565b6102c36104ad3660046128ff565b610f27565b61028b6104c0366004612aca565b610f3e565b61028b6104d3366004612b88565b610f63565b6102236104e6366004612d12565b6001600160a01b0391821660009081526101006020908152604080832093909416825291909152205460ff1690565b610131546001600160a01b0316610260565b600061053282610fca565b92915050565b606060fb805461054790612d3c565b80601f016020809104026020016040519081016040528092919081815260200182805461057390612d3c565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b60006105d58261103c565b50600090815260ff60205260409020546001600160a01b031690565b60006105fc82610be1565b9050806001600160a01b0316836001600160a01b03160361068a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b03821614806106a657506106a681336104e6565b6107185760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610681565b61072283836110a0565b505050565b610731338261111b565b6107a35760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b61072283838361119b565b600054610100900460ff16158080156107ce5750600054600160ff909116105b806107e85750303b1580156107e8575060005460ff166001145b61085a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610681565b6000805460ff19166001179055801561087d576000805461ff0019166101001790555b6108888484846113de565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000828152606560205260409020600101546108ef816114b3565b61072283836114bd565b6001600160a01b03811633146109775760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610681565b61098182826114df565b5050565b61098d611501565b6109818282611548565b61072283838360405180602001604052806000815250610e22565b6109ba611501565b6109c381611562565b50565b6060836109d281611612565b6001600160a01b038516600090815261013060205260408120906109f582611652565b9050841580610a0357508085115b15610a0c578094505b84861115610a46576040517f2cd4dad300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a528787612d8c565b905060008167ffffffffffffffff811115610a6f57610a6f6129aa565b604051908082528060200260200182016040528015610a98578160200160208202803683370190505b50905060005b82811015610ae957610aba610ab3828b612d9f565b869061165c565b828281518110610acc57610acc612db2565b602090810291909101015280610ae181612dc8565b915050610a9e565b5098975050505050505050565b610b207f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012d5460ff161515811515146109c35761012d805460ff19168215159081179091556040519081527f97b12620440c99b10431803699fdba59f6ada913f01df22599100da54860f045906020015b60405180910390a150565b610ba47f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012e610bb18282612e30565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610b6f91906128ec565b600081815260fd60205260408120546001600160a01b0316806105325760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b60006001600160a01b038216610cc45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610681565b506001600160a01b0316600090815260fe602052604090205490565b60c954600090610cf59061ffff166001612ef0565b905061ffff8116600214610d35576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60c9805461ffff191661ffff8316179055505050565b6000828152609760205260408120610d63908361165c565b9392505050565b610d947f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b610131546001600160a01b031615610dd8576040517fca231c2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610131805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060fc805461054790612d3c565b6109813383836116c4565b610e2c338361111b565b610e9e5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610681565b6108ce84848484611793565b6060610eb58261103c565b6000610ebf61181c565b61012d5490915060ff1615610ed45792915050565b805115610f115780610ee58461182c565b61012f604051602001610efa93929190612f0b565b604051602081830303815290604052915050919050565b5050604080516020810190915260008152919050565b600081815260976020526040812061053290611652565b600082815260656020526040902060010154610f59816114b3565b61072283836114df565b610f8d7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509633611668565b61012f610f9a8282612e30565b507f497a2ce104c6e48bc47b6b9084280dcda949acc005c5e715f19a96de56781ada81604051610b6f91906128ec565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061102d57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105325750610532826118cc565b600081815260fd60205260409020546001600160a01b03166109c35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610681565b600081815260ff60205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906110e282610be1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061112783610be1565b9050806001600160a01b0316846001600160a01b0316148061116f57506001600160a01b038082166000908152610100602090815260408083209388168352929052205460ff165b806111935750836001600160a01b0316611188846105ca565b6001600160a01b0316145b949350505050565b826001600160a01b03166111ae82610be1565b6001600160a01b03161461122a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b6001600160a01b0382166112a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610681565b6112b2838383600161190a565b826001600160a01b03166112c582610be1565b6001600160a01b0316146113415760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610681565b600081815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260fe855283862080546000190190559087168086528386208054600101905586865260fd90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166114495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611451611a34565b6114a86040518060600160405280602181526020016130e5602191396040518060400160405280600c81526020017f434152424f4e2d53545241540000000000000000000000000000000000000000815250611aaf565b610722838383611b24565b6109c38133611bb9565b6114c78282611c2e565b60008281526097602052604090206107229082611cd0565b6114e98282611ce5565b60008281526097602052604090206107229082611d68565b610131546001600160a01b03163314611546576040517f5990781300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b610981828260405180602001604052806000815250611d7d565b600061156d82610be1565b905061157d81600084600161190a565b61158682610be1565b600083815260ff60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b03851680855260fe8452828520805460001901905587855260fd909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0381166109c3576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610532825490565b6000610d638383611e06565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610981576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b0316836001600160a01b0316036117255760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610681565b6001600160a01b0383811660008181526101006020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61179e84848461119b565b6117aa84848484611e30565b6108ce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b606061012e805461054790612d3c565b6060600061183983611fb9565b600101905060008167ffffffffffffffff811115611859576118596129aa565b6040519080825280601f01601f191660200182016040528015611883576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461188d57509392505050565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061053257506105328261209b565b6001811115611945576040517f05fbc73900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661197c576001600160a01b0383166000908152610130602052604090206119769083612102565b506119ba565b826001600160a01b0316846001600160a01b0316146119ba576001600160a01b0384166000908152610130602052604090206119b8908361210e565b505b6001600160a01b0383166119f1576001600160a01b0384166000908152610130602052604090206119eb908361210e565b506108ce565b836001600160a01b0316836001600160a01b0316146108ce576001600160a01b038316600090815261013060205260409020611a2d9083612102565b5050505050565b600054610100900460ff16611a9f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b611aa761211a565b611546612185565b600054610100900460ff16611b1a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6109818282612266565b600054610100900460ff16611b8f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b61012d805460ff191684151517905561012e611bab8382612e30565b5061012f6108ce8282612e30565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1661098157611bec816122ea565b611bf78360206122fc565b604051602001611c08929190612fab565b60408051601f198184030181529082905262461bcd60e51b8252610681916004016128ec565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166109815760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c8c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610d63836001600160a01b038416612525565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156109815760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610d63836001600160a01b038416612574565b611d87838361266e565b611d946000848484611e30565b6107225760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b6000826000018281548110611e1d57611e1d612db2565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611fae576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290611e8d90339089908890889060040161302c565b6020604051808303816000875af1925050508015611ec8575060408051601f3d908101601f19168201909252611ec591810190613068565b60015b611f7b573d808015611ef6576040519150601f19603f3d011682016040523d82523d6000602084013e611efb565b606091505b508051600003611f735760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610681565b805181602001fd5b6001600160e01b0319167f150b7a0200000000000000000000000000000000000000000000000000000000149050611193565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612002577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061202e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061204c57662386f26fc10000830492506010015b6305f5e1008310612064576305f5e100830492506008015b612710831061207857612710830492506004015b6064831061208a576064830492506002015b600a83106105325760010192915050565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061053257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610532565b6000610d638383612525565b6000610d638383612574565b600054610100900460ff166115465760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b600054610100900460ff166121f05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b6121fc60016002613085565b60c9805461ffff191661ffff9290921691909117905561223c7f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca02509680612814565b6115467f2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca0250963361285f565b600054610100900460ff166122d15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610681565b60fb6122dd8382612e30565b5060fc6107228282612e30565b60606105326001600160a01b03831660145b6060600061230b8360026130a0565b612316906002612d9f565b67ffffffffffffffff81111561232e5761232e6129aa565b6040519080825280601f01601f191660200182016040528015612358576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061238f5761238f612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123f2576123f2612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061242e8460026130a0565b612439906001612d9f565b90505b60018111156124d6577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061247a5761247a612db2565b1a60f81b82828151811061249057612490612db2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936124cf816130b7565b905061243c565b508315610d635760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610681565b600081815260018301602052604081205461256c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610532565b506000610532565b6000818152600183016020526040812054801561265d576000612598600183612d8c565b85549091506000906125ac90600190612d8c565b90508181146126115760008660000182815481106125cc576125cc612db2565b90600052602060002001549050808760000184815481106125ef576125ef612db2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612622576126226130ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610532565b6000915050610532565b5092915050565b6001600160a01b0382166126c45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610681565b600081815260fd60205260409020546001600160a01b0316156127295760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b61273760008383600161190a565b600081815260fd60205260409020546001600160a01b03161561279c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610681565b6001600160a01b038216600081815260fe602090815260408083208054600101905584835260fd909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61098182826114bd565b6001600160e01b0319811681146109c357600080fd5b60006020828403121561289157600080fd5b8135610d6381612869565b60005b838110156128b757818101518382015260200161289f565b50506000910152565b600081518084526128d881602086016020860161289c565b601f01601f19169290920160200192915050565b602081526000610d6360208301846128c0565b60006020828403121561291157600080fd5b5035919050565b80356001600160a01b038116811461292f57600080fd5b919050565b6000806040838503121561294757600080fd5b61295083612918565b946020939093013593505050565b60008060006060848603121561297357600080fd5b61297c84612918565b925061298a60208501612918565b9150604084013590509250925092565b8035801515811461292f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156129db576129db6129aa565b604051601f8501601f19908116603f01168101908282118183101715612a0357612a036129aa565b81604052809350858152868686011115612a1c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612a4757600080fd5b610d63838335602085016129c0565b600080600060608486031215612a6b57600080fd5b612a748461299a565b9250602084013567ffffffffffffffff80821115612a9157600080fd5b612a9d87838801612a36565b93506040860135915080821115612ab357600080fd5b50612ac086828701612a36565b9150509250925092565b60008060408385031215612add57600080fd5b82359150612aed60208401612918565b90509250929050565b600080600060608486031215612b0b57600080fd5b612b1484612918565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015612b6157835183529284019291840191600101612b45565b50909695505050505050565b600060208284031215612b7f57600080fd5b610d638261299a565b600060208284031215612b9a57600080fd5b813567ffffffffffffffff811115612bb157600080fd5b61119384828501612a36565b600060208284031215612bcf57600080fd5b610d6382612918565b60008060208385031215612beb57600080fd5b823567ffffffffffffffff80821115612c0357600080fd5b818501915085601f830112612c1757600080fd5b813581811115612c2657600080fd5b866020828501011115612c3857600080fd5b60209290920196919550909350505050565b60008060408385031215612c5d57600080fd5b50508035926020909101359150565b60008060408385031215612c7f57600080fd5b612c8883612918565b9150612aed6020840161299a565b60008060008060808587031215612cac57600080fd5b612cb585612918565b9350612cc360208601612918565b925060408501359150606085013567ffffffffffffffff811115612ce657600080fd5b8501601f81018713612cf757600080fd5b612d06878235602084016129c0565b91505092959194509250565b60008060408385031215612d2557600080fd5b612d2e83612918565b9150612aed60208401612918565b600181811c90821680612d5057607f821691505b602082108103612d7057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561053257610532612d76565b8082018082111561053257610532612d76565b634e487b7160e01b600052603260045260246000fd5b60006000198203612ddb57612ddb612d76565b5060010190565b601f82111561072257600081815260208120601f850160051c81016020861015612e095750805b601f850160051c820191505b81811015612e2857828155600101612e15565b505050505050565b815167ffffffffffffffff811115612e4a57612e4a6129aa565b612e5e81612e588454612d3c565b84612de2565b602080601f831160018114612e935760008415612e7b5750858301515b600019600386901b1c1916600185901b178555612e28565b600085815260208120601f198616915b82811015612ec257888601518255948401946001909101908401612ea3565b5085821015612ee05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561266757612667612d76565b600084516020612f1e8285838a0161289c565b855191840191612f318184848a0161289c565b8554920191600090612f4281612d3c565b60018281168015612f5a5760018114612f6f57612f9b565b60ff1984168752821515830287019450612f9b565b896000528560002060005b84811015612f9357815489820152908301908701612f7a565b505082870194505b50929a9950505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fe381601785016020880161289c565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302081602884016020880161289c565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261305e60808301846128c0565b9695505050505050565b60006020828403121561307a57600080fd5b8151610d6381612869565b61ffff82811682821603908082111561266757612667612d76565b808202811582820484141761053257610532612d76565b6000816130c6576130c6612d76565b506000190190565b634e487b7160e01b600052603160045260246000fdfe436172626f6e204175746f6d617465642054726164696e67205374726174656779a164736f6c6343000813000a", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." - }, - "ApprovalForAll(address,address,bool)": { - "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." - }, - "BaseExtensionUpdated(string)": { - "details": "triggered when updating the baseExtension" - }, - "BaseURIUpdated(string)": { - "details": "triggered when updating the baseURI" - }, - "Initialized(uint8)": { - "details": "Triggered when the contract has been initialized or reinitialized." - }, - "RoleAdminChanged(bytes32,bytes32,bytes32)": { - "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" - }, - "RoleGranted(bytes32,address,address)": { - "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." - }, - "RoleRevoked(bytes32,address,address)": { - "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `tokenId` token is transferred from `from` to `to`." - }, - "UseGlobalURIUpdated(bool)": { - "details": "triggered when updating useGlobalURI" - } - }, - "kind": "dev", - "methods": { - "approve(address,uint256)": { - "details": "See {IERC721-approve}." - }, - "balanceOf(address)": { - "details": "See {IERC721-balanceOf}." - }, - "burn(uint256)": { - "details": "destroys the voucher token for the given strategyId requirements: - the caller must be the controller address" - }, - "constructor": { - "details": "used to initialize the implementation" - }, - "controller()": { - "details": "returns the controller address" - }, - "getApproved(uint256)": { - "details": "See {IERC721-getApproved}." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(bool,string,string)": { - "details": "fully initializes the contract and its parents" - }, - "isApprovedForAll(address,address)": { - "details": "See {IERC721-isApprovedForAll}." - }, - "mint(address,uint256)": { - "details": "creates a new voucher token for the given strategyId, transfers it to the owner requirements: - the caller must be the controller address" - }, - "name()": { - "details": "See {IERC721Metadata-name}." - }, - "ownerOf(uint256)": { - "details": "See {IERC721-ownerOf}." - }, - "postUpgrade(bytes)": { - "details": "performs post-upgrade initialization requirements: - this must and can be called only once per-upgrade" - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." - }, - "roleAdmin()": { - "details": "returns the admin role" - }, - "safeTransferFrom(address,address,uint256)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "safeTransferFrom(address,address,uint256,bytes)": { - "details": "See {IERC721-safeTransferFrom}." - }, - "setApprovalForAll(address,bool)": { - "details": "See {IERC721-setApprovalForAll}." - }, - "setBaseExtension(string)": { - "details": "sets the base extension requirements: - the caller must be the admin of this contract" - }, - "setBaseURI(string)": { - "details": "sets the base URI requirements: - the caller must be the admin of this contract" - }, - "setController(address)": { - "details": "sets the controller address requirements: - the caller must be the admin of this contract - controller address must not be set" - }, - "supportsInterface(bytes4)": { - "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." - }, - "symbol()": { - "details": "See {IERC721Metadata-symbol}." - }, - "tokenURI(uint256)": { - "details": "depending on the useGlobalURI flag, returns a unique URI point to a json representing the voucher, or a URI of a global json used for all tokens" - }, - "tokensByOwner(address,uint256,uint256)": { - "details": "returns a list of tokenIds belonging to the given owner note that for the full list of tokenIds pass 0 to both startIndex and endIndex" - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC721-transferFrom}." - }, - "useGlobalURI(bool)": { - "details": "sets the useGlobalURI flag requirements: - the caller must be the admin of this contract" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 588, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2318, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 2591, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "51", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 184, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roles", - "offset": 0, - "slot": "101", - "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" - }, - { - "astId": 479, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 33, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_roleMembers", - "offset": 0, - "slot": "151", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)" - }, - { - "astId": 143, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 21185, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_initializations", - "offset": 0, - "slot": "201", - "type": "t_uint16" - }, - { - "astId": 21191, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 863, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_name", - "offset": 0, - "slot": "251", - "type": "t_string_storage" - }, - { - "astId": 865, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_symbol", - "offset": 0, - "slot": "252", - "type": "t_string_storage" - }, - { - "astId": 869, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_owners", - "offset": 0, - "slot": "253", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 873, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_balances", - "offset": 0, - "slot": "254", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 877, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_tokenApprovals", - "offset": 0, - "slot": "255", - "type": "t_mapping(t_uint256,t_address)" - }, - { - "astId": 883, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_operatorApprovals", - "offset": 0, - "slot": "256", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" - }, - { - "astId": 1785, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "257", - "type": "t_array(t_uint256)44_storage" - }, - { - "astId": 24088, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_useGlobalURI", - "offset": 0, - "slot": "301", - "type": "t_bool" - }, - { - "astId": 24090, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__baseURI", - "offset": 0, - "slot": "302", - "type": "t_string_storage" - }, - { - "astId": 24092, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_baseExtension", - "offset": 0, - "slot": "303", - "type": "t_string_storage" - }, - { - "astId": 24097, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_ownedTokens", - "offset": 0, - "slot": "304", - "type": "t_mapping(t_address,t_struct(UintSet)11994_storage)" - }, - { - "astId": 24099, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_controller", - "offset": 0, - "slot": "305", - "type": "t_address" - }, - { - "astId": 24105, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "__gap", - "offset": 0, - "slot": "306", - "type": "t_array(t_uint256)45_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)44_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" - }, - "t_array(t_uint256)45_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => bool))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_bool)" - }, - "t_mapping(t_address,t_struct(UintSet)11994_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct EnumerableSet.UintSet)", - "numberOfBytes": "32", - "value": "t_struct(UintSet)11994_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)3901_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)3901_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)179_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_address)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)3901_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 3900, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3586_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)179_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 176, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 178, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)11522_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 11517, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 11521, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3586_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 3581, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3585, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(UintSet)11994_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.UintSet", - "members": [ - { - "astId": 11993, - "contract": "contracts/voucher/Voucher.sol:Voucher", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)11522_storage" - } - ], - "numberOfBytes": "64" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/src/contracts/sei/Voucher_Proxy.json b/src/contracts/sei/Voucher_Proxy.json deleted file mode 100644 index 0a45af4..0000000 --- a/src/contracts/sei/Voucher_Proxy.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "receipt": { - "to": null, - "from": "0xe01EA58F6DA98488E4C92fD9b3E49607639C5370", - "contractAddress": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "transactionIndex": 0, - "gasUsed": "971164", - "logsBloom": "0x000000048208000008000000000000004800000000000000000000000000000000000000000000000000000000008000000000000040000000000000000000000000000000000000000008204000020000000000000000000000000000000000000000000200004000000000000008000000008000000000000000000000000000000100000000000080000400000000000000000000a0000000000000800000000000000000000000000000000400000000000000000000001000000000000000000020000000000000000000040000000000000400000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc", - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "logs": [ - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000b0d39990e1c38b50d0b7f6911525535fbacb4c26" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096" - ], - "data": "0x", - "logIndex": 1, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x2172861495e7b85edac73e3cd5fbb42dd675baadf627720e687bcfdaca025096", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370", - "0x000000000000000000000000e01ea58f6da98488e4c92fd9b3e49607639c5370" - ], - "data": "0x", - "logIndex": 2, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - }, - { - "transactionIndex": 3, - "blockNumber": 79146505, - "transactionHash": "0x40ab0d1fd436db5be6f4cc61c0f104b6ff435bc40985fa24753734103a5cad05", - "address": "0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045d2e25c04f43a06f6c3e21e4f39b860d05a7ac8", - "logIndex": 4, - "blockHash": "0xdff6042d670f8ea240f3bd8696c82d5ad6f0880a8603198a64840c6c45d4f1bc" - } - ], - "blockNumber": 79146505, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [ - "0xb0d39990E1C38B50D0b7f6911525535Fbacb4C26", - "0x45d2e25C04F43A06f6C3e21e4f39B860D05a7aC8", - "0x2c8e04150000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d557944557a51747741684d4231687259615141716d52546267743973556e77713131476571797a7a5375716e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405260405162000f5f38038062000f5f83398101604081905262000026916200044a565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200052a565b60008051602062000f188339815191521462000075576200007562000550565b62000083828260006200013c565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200052a565b60008051602062000ef883398151915214620000d357620000d362000550565b6001600160a01b038216608081905260008051602062000ef88339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050620005b9565b620001478362000179565b600082511180620001555750805b156200017457620001728383620001bb60201b620002a91760201c565b505b505050565b6200018481620001ea565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e3838360405180606001604052806027815260200162000f3860279139620002b2565b9392505050565b62000200816200039860201b620002d51760201c565b620002685760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806200029160008051602062000f1883398151915260001b620003a760201b620002411760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6200031c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200025f565b600080856001600160a01b03168560405162000339919062000566565b600060405180830381855af49150503d806000811462000376576040519150601f19603f3d011682016040523d82523d6000602084013e6200037b565b606091505b5090925090506200038e828286620003aa565b9695505050505050565b6001600160a01b03163b151590565b90565b60608315620003bb575081620001e3565b825115620003cc5782518084602001fd5b8160405162461bcd60e51b81526004016200025f919062000584565b80516001600160a01b03811681146200040057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004385781810151838201526020016200041e565b83811115620001725750506000910152565b6000806000606084860312156200046057600080fd5b6200046b84620003e8565b92506200047b60208501620003e8565b60408501519092506001600160401b03808211156200049957600080fd5b818601915086601f830112620004ae57600080fd5b815181811115620004c357620004c362000405565b604051601f8201601f19908116603f01168101908382118183101715620004ee57620004ee62000405565b816040528281528960208487010111156200050857600080fd5b6200051b8360208301602088016200041b565b80955050505050509250925092565b6000828210156200054b57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200057a8184602087016200041b565b9190910192915050565b6020815260008251806020840152620005a58160408501602087016200041b565b601f01601f19169190910160400192915050565b608051610900620005f86000396000818161011201528181610176015281816102060152818161025e01528181610287015261030901526109006000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461076c565b6100fa565b610050610088366004610787565b61015e565b34801561009957600080fd5b506100a26101ec565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610244565b6100e86102f1565b6100f86100f36103e2565b610422565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101565761015381604051806020016040528060008152506000610446565b50565b6101536100e0565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101e4576101df8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610446915050565b505050565b6101df6100e0565b60003373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610239576102346103e2565b905090565b6102416100e0565b90565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561023957507f000000000000000000000000000000000000000000000000000000000000000090565b60606102ce83836040518060600160405280602781526020016108a460279139610471565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102347f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e808015610441573d6000f35b3d6000fd5b61044f83610599565b60008251118061045c5750805b156101df5761046b83836102a9565b50505050565b606073ffffffffffffffffffffffffffffffffffffffff84163b610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103d9565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161053f9190610836565b600060405180830381855af49150503d806000811461057a576040519150601f19603f3d011682016040523d82523d6000602084013e61057f565b606091505b509150915061058f8282866105e6565b9695505050505050565b6105a281610639565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606083156105f55750816102ce565b8251156106055782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d99190610852565b73ffffffffffffffffffffffffffffffffffffffff81163b6106dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103d9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60006020828403121561077e57600080fd5b6102ce82610743565b60008060006040848603121561079c57600080fd5b6107a584610743565b9250602084013567ffffffffffffffff808211156107c257600080fd5b818601915086601f8301126107d657600080fd5b8135818111156107e557600080fd5b8760208285010111156107f757600080fd5b6020830194508093505050509250925092565b60005b8381101561082557818101518382015260200161080d565b8381111561046b5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212206f70214c51cdd41c05ba0ffeb72b309ca3c8be178fd6e73c12162330799984f364736f6c634300080a0033", - "devdoc": { - "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "constructor": { - "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file